string_split_at_index :: fn (str: string, index: s32, lhs: *string, rhs: *string) bool
Split input string str at index position and return true when split was done. Result tokens only points into original memory of the str, they are not supposed to be freed. When index is out of str range function return false, lhs and rhs buffers are not modified.
str String to be splitted.
index Split position.
lhs Optional output left hand side string.
rhs Optional output right hand side string.
True when delimiter was found.
main :: fn () s32 { lhs: string; rhs: string; if string_split_at_index("foobar", 3, &lhs, &rhs) { print("lhs = %\n", lhs); print("rhs = %\n", rhs); } return 0; }
Declared in: string.bl