fix struppercase and strlowecase
This commit is contained in:
parent
e28ad23a7f
commit
3de2acc941
2 changed files with 12 additions and 11 deletions
|
@ -13,9 +13,10 @@ func main {
|
|||
|
||||
id STREAM_CLOSE stream
|
||||
|
||||
"testing\n" puts
|
||||
"Testing: \n" struppercase puts
|
||||
"helloworld.isbpl" include
|
||||
main pop
|
||||
"TEST DONE\n" strlowercase puts
|
||||
|
||||
0
|
||||
}
|
||||
|
|
20
std.isbpl
20
std.isbpl
|
@ -361,27 +361,27 @@ func random {
|
|||
}
|
||||
|
||||
func strlowercase {
|
||||
def s =s "bind string" #
|
||||
def s _array =s "bind string" #
|
||||
def i 0 =i
|
||||
while { i s alen lt } {
|
||||
def char s i aget =char
|
||||
char 64 gt char 91 lt and if {
|
||||
s i char 32 + aput
|
||||
def chr s i aget =chr
|
||||
chr "A" char lt not chr "Z" char gt not and if {
|
||||
s i chr "a" char "A" char - + aput
|
||||
}
|
||||
i inc
|
||||
}
|
||||
s
|
||||
s _string
|
||||
}
|
||||
|
||||
func struppercase {
|
||||
def s =s "bind string" #
|
||||
def s _array =s "bind string" #
|
||||
def i 0 =i
|
||||
while { i s alen lt } {
|
||||
def char s i aget =char
|
||||
char 89 gt char 123 lt and if {
|
||||
s i char 32 - aput
|
||||
def chr s i aget =chr
|
||||
chr "a" char lt not chr "z" char gt not and if {
|
||||
s i chr "a" char "A" char - - aput
|
||||
}
|
||||
i inc
|
||||
}
|
||||
s
|
||||
s _string
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue