Add strings.contains_space

This commit is contained in:
gingerBill
2024-08-19 16:31:03 +01:00
parent 2a0785037b
commit 9d7ab8d5ca

View File

@@ -346,6 +346,17 @@ Output:
contains_any :: proc(s, chars: string) -> (res: bool) {
return index_any(s, chars) >= 0
}
contains_space :: proc(s: string) -> (res: bool) {
for c in s {
if is_space(r) {
return true
}
}
return false
}
/*
Returns the UTF-8 rune count of the string `s`