Module tmx_utils::string_ext
source · Expand description
String Extensions
Functions
- Formats a list of strings with commas and “and” if necessary. Uses the oxford comma.
Note: An attempt was made to genericize these functions to work with Vec<T : Display + Join>, but the Join trait is unstable. - Formats a list of string slices with commas and “and” if necessary. Uses the oxford comma.
Note: An attempt was made to genericize these functions to work with Vec<T : Display + Join>, but the Join trait is unstable. - Reads a line from a reader and trims it. Returns io errors or an error if the line is empty.
- Reads a line from
std::io::stdin().lock()and trims it. Returns an error if the line is empty or if an error is returned fromread_line().