ox --> "sam" sam ox --> "Big 'ole bag of dirt" "Big 'ole bag of dirt"Strings are most frequently used for file and shader names.
There are several convenient functions for dealing with strings.
Strings can be converted to and from other primitive data types:
ox --> (number->string 5) "5" ox --> (string->number "17") 17 ox --> (string->symbol "spam") spam ox --> (symbol->string 'spam) "spam"Strings can be compared to one another for equality:
ox --> (string=? "hi" "low") () ox --> (string=? "blah" "blah") tStrings can be strung together to make bigger strings:
ox --> (string-append "Tasha" " " "ate all my" " cookies") "Tasha ate all my cookies"String length can be determined:
ox --> (string-length "And so it goes") 14Individual characters in a string can be referenced (remember, the first character is number zero!):
ox --> (string-ref "Big Nose" 2) "g"Return to Scheme Introduction