Function voca_rs::split::code_points [−][src]
pub fn code_points(subject: &str) -> Vec<u16>
Expand description
Returns an array of Unicode code point values from characters of subject
.
NOTE: Unicode escape must not be a surrogate
Arguments
subject
- The string to extract from.
Example
use voca_rs::*;
split::code_points("rain");
// => [114, 97, 105, 110]
split::code_points("Un garçon de café");
// => [85, 110, 32, 103, 97, 114, 231, 111, 110, 32, 100, 101, 32, 99, 97, 102, 233]
use voca_rs::Voca;
"rain"._code_points();
// => [114, 97, 105, 110]