Skip to content

Commit

Permalink
Namespacing STRING is DECLAREs
Browse files Browse the repository at this point in the history
  • Loading branch information
grymmjack committed Dec 6, 2023
1 parent 02b13d6 commit 28f1505
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 74 deletions.
26 changes: 13 additions & 13 deletions STRINGS/STRINGS.BI
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,29 @@ CONST GJ_LIB_MAX_STR_POSITIONS = 50

DECLARE LIBRARY
'is an alphabet letter(isalpha(c) or isdigit(c))
FUNCTION isalnum% (BYVAL c AS INTEGER)
FUNCTION GJ_LIB_isalnum% (BYVAL c AS INTEGER)
'is letter (isupper(c) or islower(c))
FUNCTION isalpha% (BYVAL c AS INTEGER)
FUNCTION GJ_LIB_isalpha% (BYVAL c AS INTEGER)
'is a decimal digit
FUNCTION isdigit% (BYVAL c AS INTEGER)
FUNCTION GJ_LIB_isdigit% (BYVAL c AS INTEGER)
'is a printing character other than space
FUNCTION isgraph% (BYVAL c AS INTEGER)
FUNCTION GJ_LIB_isgraph% (BYVAL c AS INTEGER)
'is a lower-case letter
FUNCTION islower% (BYVAL c AS INTEGER)
FUNCTION GJ_LIB_islower% (BYVAL c AS INTEGER)
'is printing character. ASCII: &H20 (" ") to &H7E (~)
FUNCTION isprint% (BYVAL c AS INTEGER)
FUNCTION GJ_LIB_isprint% (BYVAL c AS INTEGER)
'is printing character other than space, letter, digit
FUNCTION ispunct% (BYVAL c AS INTEGER)
FUNCTION GJ_LIB_ispunct% (BYVAL c AS INTEGER)
'is space, formfeed, newline, return, tab, vertical tab
FUNCTION isspace% (BYVAL c AS INTEGER)
FUNCTION GJ_LIB_isspace% (BYVAL c AS INTEGER)
'is only space or tab
FUNCTION isblank% (BYVAL c AS INTEGER)
FUNCTION GJ_LIB_isblank% (BYVAL c AS INTEGER)
'is upper-case letter
FUNCTION isupper% (BYVAL c AS INTEGER)
FUNCTION GJ_LIB_isupper% (BYVAL c AS INTEGER)
'is a hexdecimal digit character(0 thru 9 or A thru F)
FUNCTION isxdigit% (BYVAL c AS INTEGER)
FUNCTION GJ_LIB_isxdigit% (BYVAL c AS INTEGER)
'return lower-case equivalent
FUNCTION tolower% (BYVAL c AS INTEGER)
FUNCTION GJ_LIB.tolower% (BYVAL c AS INTEGER)
'return upper-case equivalent
FUNCTION toupper% (BYVAL c AS INTEGER)
FUNCTION GJ_LIB.toupper% (BYVAL c AS INTEGER)
END DECLARE
22 changes: 11 additions & 11 deletions STRINGS/STRINGS.BM
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ FUNCTION STR.is_blank%(s$)
IF s$ = "" THEN EXIT FUNCTION
i% = 1
DO:
IF isblank(ASC(s$, i%)) = 0 THEN
IF GJ_LIB_isblank(ASC(s$, i%)) = 0 THEN
STR.is_blank% = 0
EXIT FUNCTION
END IF
Expand All @@ -126,7 +126,7 @@ FUNCTION STR.is_hexadecimal%(s$)
IF s$ = "" THEN EXIT FUNCTION
i% = 1
DO:
IF isxdigit(ASC(s$, i%)) = 0 THEN
IF GJ_LIB_isxdigit(ASC(s$, i%)) = 0 THEN
STR.is_hexadecimal% = 0
EXIT FUNCTION
END IF
Expand Down Expand Up @@ -170,7 +170,7 @@ FUNCTION STR.is_punctuation%(s$)
IF s$ = "" THEN EXIT FUNCTION
i% = 1
DO:
IF ispunct%(ASC(s$, i%)) = 0 THEN
IF GJ_LIB_ispunct%(ASC(s$, i%)) = 0 THEN
STR.is_punctuation% = 0
EXIT FUNCTION
END IF
Expand All @@ -196,7 +196,7 @@ FUNCTION STR.is_graphical%(s$)
IF s$ = "" THEN EXIT FUNCTION
i% = 1
DO:
IF isgraph%(ASC(s$, i%)) = 0 THEN
IF GJ_LIB_isgraph%(ASC(s$, i%)) = 0 THEN
STR.is_graphical% = 0
EXIT FUNCTION
END IF
Expand All @@ -218,7 +218,7 @@ FUNCTION STR.is_printable%(s$)
IF s$ = "" THEN EXIT FUNCTION
i% = 1
DO:
IF isprint%(ASC(s$, i%)) = 0 THEN
IF GJ_LIB_isprint%(ASC(s$, i%)) = 0 THEN
STR.is_printable% = 0
EXIT FUNCTION
END IF
Expand All @@ -240,7 +240,7 @@ FUNCTION STR.is_white_space%(s$)
IF s$ = "" THEN EXIT FUNCTION
i% = 1
DO:
IF isspace%(ASC(s$, i%)) = 0 THEN
IF GJ_LIB_isspace%(ASC(s$, i%)) = 0 THEN
STR.is_white_space% = 0
EXIT FUNCTION
END IF
Expand All @@ -261,7 +261,7 @@ FUNCTION STR.is_lower_case%(s$)
IF s$ = "" THEN EXIT FUNCTION
i% = 1
DO:
IF islower%(ASC(s$, i%)) = 0 THEN
IF GJ_LIB_islower%(ASC(s$, i%)) = 0 THEN
STR.is_lower_case% = 0
EXIT FUNCTION
END IF
Expand All @@ -282,7 +282,7 @@ FUNCTION STR.is_upper_case%(s$)
IF s$ = "" THEN EXIT FUNCTION
i% = 1
DO:
IF isupper%(ASC(s$, i%)) = 0 THEN
IF GJ_LIB_isupper%(ASC(s$, i%)) = 0 THEN
STR.is_upper_case% = 0
EXIT FUNCTION
END IF
Expand All @@ -303,7 +303,7 @@ FUNCTION STR.is_numeric%(s$)
IF s$ = "" THEN EXIT FUNCTION
i% = 1
DO:
IF isdigit%(ASC(s$, i%)) = 0 THEN
IF GJ_LIB_isdigit%(ASC(s$, i%)) = 0 THEN
STR.is_numeric% = 0
EXIT FUNCTION
END IF
Expand All @@ -324,7 +324,7 @@ FUNCTION STR.is_alpha%(s$)
IF s$ = "" THEN EXIT FUNCTION
i% = 1
DO:
IF isalpha%(ASC(s$, i%)) = 0 THEN
IF GJ_LIB_isalpha%(ASC(s$, i%)) = 0 THEN
STR.is_alpha% = 0
EXIT FUNCTION
END IF
Expand All @@ -345,7 +345,7 @@ FUNCTION STR.is_alpha_numeric%(s$)
IF s$ = "" THEN EXIT FUNCTION
i% = 1
DO:
IF isalnum%(ASC(s$, i%)) = 0 THEN
IF GJ_LIB_isalnum%(ASC(s$, i%)) = 0 THEN
STR.is_alpha_numeric% = 0
EXIT FUNCTION
END IF
Expand Down
Loading

0 comments on commit 28f1505

Please sign in to comment.