1 | 21/02/2019 | String | &str | CString | &CStr | *const c_char | Vec<u8> | &[u8] | &OSStr | OSString | Chars | Bytes | EncodeWide | Vec<u16> | *const wchar_t | &[u16] | 🔒 Stacker ID | ||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | FROM/HAVE ↓ | 5tRkKLhctShcqr3heAtR2S | |||||||||||||||||
3 | String | Clone::clone | & | CString::new | String::as_ptr | String::into_bytes | & | str::chars | str::bytes | ei9Z6XFjJGkSydsL52diGk | |||||||||
4 | &str | N/A | CString::new | t | str::as_bytes | str::chars | str::bytes | Z5iMAWRM6mSuax35Ewekd7 | |||||||||||
5 | CString | he following trait bounds were not satisfied: `CString: std::fmt::Display` | CStr::to_str | Clone::clone | & | CString::as_ptr | CString::as_bytes, as_bytes_with_null | cyeviyiV7ui3P6SL9saLHj | |||||||||||
6 | &CStr | CStr::to_string_lossy | CStr::to_str | ToOwned::to_owned | CStr::as_ptr | CStr::to_bytes, to_bytes_with_null | UNn3JSbPcdTXEGmpdRJSBh | ||||||||||||
7 | *const c_char | CString::from_ptr | CStr::from_ptr | N/A | cVruMmiqJnT4LW4ZYFJ2vP | ||||||||||||||
8 | Vec<u8> | String::from_utf8 | CString::new, CString::from_vec_unchecked | Clone::clone | & | OsString::from_bytes | Vec::iter | njE2aeVa2tB53CFGyY4FzV | |||||||||||
9 | &[u8] | str::from_utf8 | CString::new | ToOwned::to_owned | N/A | #27390 | slice::iter | 4ectHaBNu5pjqmCWSGMMmM | |||||||||||
10 | &OSStr | OsStr::to_string_lossy | OsStr::to_str | OsStr::to_cstring *deprecated since 1.6.0 | OsStrExt::to_bytes (unix) | N/A | OsStr::to_os_string, ToOwned::to_owned | DG9exs5LTjNuirfRQzgV6d | |||||||||||
11 | OSString | OsStr::to_string_lossy | OsStr::to_str | OsString::as_os_str | Clone::clone | DXpaLHpsJU9wtSAj2dmFVX | |||||||||||||
12 | Iterator::collect | Clone::clone | 4t333hPrZ2zCSsgGGGX3Kb | ||||||||||||||||
13 | Bytes | Iterator::collect | Clone::clone | chYWdJaMFJiuHasDqhvNRJ | |||||||||||||||
14 | *const wchar_t | slice::from_raw_parts | g2CV2xjxJDmuSLTwL5DuKw | ||||||||||||||||
15 | EncodeWide | LnNhPnSx3d7yQRK9JJV3R4 | |||||||||||||||||
16 | &[u16] | Now part of: | nNvT9Dph7uV3LyvKhWAnXb | ||||||||||||||||
17 | https://cheats.rs/#string-conversions | TL4ETcwUSJcGRgHHfVsc8t | |||||||||||||||||
18 | Be mindful of not filling this backwards, it's not that hard! :) | cUEr3W3vykXjWBqLYpxwXx | |||||||||||||||||
19 | Just follow the arrows :D | KL3zGa6krRRa7mtyGyarvs |