' String Case/Trim — UCASE$/LCASE$, TRIM$/LTRIM$/RTRIM$, LSET/RSET
#COMPILE EXE
#DIM ALL

FUNCTION PBMAIN() AS LONG
    LOCAL text AS STRING
    LOCAL messy AS STRING

    text = "Hello World"
    PRINT "Original: " + text
    PRINT "UCASE$:   " + UCASE$(text)
    PRINT "LCASE$:   " + LCASE$(text)
    PRINT

    messy = "   padded text   "
    PRINT "Original:     '" + messy + "'"
    PRINT "TRIM$:        '" + TRIM$(messy) + "'"
    PRINT "LTRIM$:       '" + LTRIM$(messy) + "'"
    PRINT "RTRIM$:       '" + RTRIM$(messy) + "'"
    PRINT

    LOCAL a AS STRING
    LOCAL b AS STRING
    a = "Left"
    b = "Right"

    LSET a = "Overflow test here"
    RSET b = "Overflow"
    PRINT "LSET:  '" + a + "'"
    PRINT "RSET:  '" + b + "'"

    FUNCTION = 0
END FUNCTION
