String matching: Difference between revisions

Content added Content deleted
(Applesoft BASIC)
Line 638: Line 638:
#symbol program =
#symbol program =
[
[
stringControl starting:"hello" &with:"hel" ?
literalControl starting:"hello" &with:"hel" ?
[
[
consoleEx writeLine:"hello starts with hel".
consoleEx writeLine:"hello starts with hel".
].
].
stringControl ending:"hello" &with:"llo" ?
literalControl ending:"hello" &with:"llo" ?
[
[
consoleEx writeLine:"hello ends with llo".
consoleEx writeLine:"hello ends with llo".
].
].


stringControl contain:"el" &in:"hello" ?
literalControl contain:"el" &in:"hello" ?
[
[
consoleEx writeLine:"hello contains el".
consoleEx writeLine:"hello contains el".