started writing lexer after making string lib

This commit is contained in:
2026-04-13 19:59:48 +10:00
parent f67c045845
commit c0c35e4d17
24 changed files with 601 additions and 7 deletions

View File

@@ -0,0 +1,25 @@
# string_EndsWith
Check if a string has another string as a suffix.
## Arguments
- str (string): the string to check against.
- suffix (string): the suffix to check for.
## Returns
hasSuffix (bool): returns `true` if `str` has the given `suffix` as a suffix, otherwise `false`.
## Example
### Ground
```python
call !string_EndsWith "file.txt" ".txt" &hasSuffix
println $hasSuffix # true
call !string_EndsWith "file.grnd" ".txt" &hasSuffix
println $hasSuffix # false
```
### Solstice
```c
puts string_EndsWith("file.txt", ".txt") // true
puts string_EndsWith("file.grnd", ".txt") // false
```