diff --git a/src/packages/string_more.rs b/src/packages/string_more.rs index 427627fb..11357d88 100644 --- a/src/packages/string_more.rs +++ b/src/packages/string_more.rs @@ -372,6 +372,10 @@ mod string_functions { format!("{:?}{}", array, string) } #[rhai_fn(name = "split")] + pub fn chars(string: &str) -> Array { + string.chars().map(Into::::into).collect() + } + #[rhai_fn(name = "split")] pub fn split_at(string: ImmutableString, start: INT) -> Array { if start <= 0 { vec!["".into(), string.into()]