Rust String Conversions

converting between Rust string types

Contents:

This is a small collection of functions for displaying data on the console or returning Strings.
  1. string_to_path_buf
    Converts String to std::path::PathBuf instance.
  2. path_buf_to_string
    Converts std::path::PathBuf to String instance.
  3. path_buf_to_os_string
    Converts std::path::PathBuf to std::ffi::OsString instance
  4. os_string_to_path_buf
    Converts std::ffi::OsString to std::path::PathBuf instance.
  5. string_to_os_string
    Converts String to std::ffi::OsString instance.
  6. os_string_to_string
    Converts std::ffi::OsString to String instance.

Build:

This Rust code was built with Cargo from Visual Studio Code terminal and tested on Windows 10.

Status:

No planned additions.