mirror of
https://github.com/irmen/prog8.git
synced 2024-12-27 05:29:38 +00:00
fix string.isupper()
This commit is contained in:
parent
745d192563
commit
3844bf1f72
@ -399,15 +399,21 @@ fail clc ; yes, no match found, return with c=0
|
||||
}
|
||||
|
||||
asmsub isupper(ubyte character @A) -> bool @Pc {
|
||||
; shifted petscii has 2 ranges that contain the upper case letters...
|
||||
%asm {{
|
||||
cmp #'A'
|
||||
cmp #97
|
||||
bcs +
|
||||
rts
|
||||
+ cmp #'Z'+1
|
||||
bcc +
|
||||
+ cmp #122+1
|
||||
bcc _yes
|
||||
cmp #193
|
||||
bcs +
|
||||
rts
|
||||
+ cmp #218+1
|
||||
bcc _yes
|
||||
clc
|
||||
rts
|
||||
+ sec
|
||||
_yes sec
|
||||
rts
|
||||
}}
|
||||
}
|
||||
|
@ -261,13 +261,16 @@ Provides string manipulation routines.
|
||||
Uppercases the PETSCII-string in place.
|
||||
|
||||
``lowerchar (char)``
|
||||
Returns lowercased character.
|
||||
Returns lowercased PETSCII character.
|
||||
|
||||
``upperchar (char)``
|
||||
Returns uppercased character.
|
||||
Returns uppercased PETSCII character.
|
||||
|
||||
``isdigit (char)``, ``islower (char)``, ``isupper (char)``, ``isletter (char)``
|
||||
Returns boolean if the character is a numerical digit 0-0, lowercase letter, uppercase letter, or any letter.
|
||||
``isdigit (char)``
|
||||
Returns boolean if the character is a numerical digit 0-9
|
||||
|
||||
``islower (char)``, ``isupper (char)``, ``isletter (char)``
|
||||
Returns boolean if the character is a shifted-PETSCII lowercase letter, uppercase letter, or any letter.
|
||||
|
||||
``startswith (string, prefix) -> bool``
|
||||
Returns true if string starts with prefix, otherwise false
|
||||
|
Loading…
Reference in New Issue
Block a user