mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Add strings.contains_space
This commit is contained in:
@@ -346,6 +346,17 @@ Output:
|
|||||||
contains_any :: proc(s, chars: string) -> (res: bool) {
|
contains_any :: proc(s, chars: string) -> (res: bool) {
|
||||||
return index_any(s, chars) >= 0
|
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`
|
Returns the UTF-8 rune count of the string `s`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user