Module vec

Module vec 

Source
Expand description

Functions that operate on vectors.

Functions§

vec_longest_str
In a vector of Strings, returns the longest element. If more than one element has the longest length, the last of those long elements is returned.
vec_longest_str_len
Returns the length of the longest String in a String vector in bytes. Don’t mistake this for pixels.
vec_random_choice
Pick an element randomly. Return, in a tuple, the element along with the it’s index in the vector.
vec_string_to_str
Converts a vector of Strings into a vector of &str’s.