Wheel IDE

Online demo »

String, subString

String number example

This demo declares a string with a value, takes two sub strings and prints them in the console.

Code

#project "String indexOf example"

#include "lib/modules/standard.whl"
#include "lib/modules/string.whl"

proc main()
    string s = "The quick brown fox jumped..."
    string s1, s2

    ; Get the sub string "The quick"...
    subString(s, 0, 9, s1)
    printS(s1)

    ; Get the substring "brown fox jumped"...
    subString(s, 10, 16, s2)
    printS(s2)
end