转换大写和小写
如前所述,字符串通常不区分大小写,但仅考虑字符串的比较。内置函数可以更换外壳。
CAPS(字符串)
使字符串大写
LC(字符串)
使字符串小写
DEFINE VARIABLE c AS CHARACTER NO-UNDO.
DEFINE VARIABLE d AS CHARACTER NO-UNDO.
c = "Hello".
d = "World".
DISPLAY CAPS(c) LC(d). // HELLO world
记住字符串通常不区分大小写
DEFINE VARIABLE c AS CHARACTER NO-UNDO.
DEFINE VARIABLE d AS CHARACTER NO-UNDO.
c = "hello".
d = "hello".
DISPLAY CAPS(c) = LC(d). // yes
除非特定为 CASE-SENSITIVE
DEFINE VARIABLE c AS CHARACTER NO-UNDO CASE-SENSITIVE.
DEFINE VARIABLE d AS CHARACTER NO-UNDO.
c = "hello".
d = "hello".
DISPLAY CAPS(c) = LC(d). // no