lang: core: strings: Add a substring function named substr

This commit is contained in:
James Shubin
2024-10-03 13:01:08 -04:00
parent 74119a0a53
commit 898b58e3e7
2 changed files with 70 additions and 0 deletions

9
examples/lang/substr.mcl Normal file
View File

@@ -0,0 +1,9 @@
import "fmt"
import "strings"
$s = "hello"
$sub = strings.substr($s, 0, 4)
print "debug" {
msg => "${sub}",
}