I have added our first set of string related function macros.
/* Function MACRO Define's */
#define LTRIM(x) sm->Ltrim(&x, x)
#define RTRIM(x) sm->Rtrim(&x, x)
#define UCASE(x) sm->Ucase(&x, x)
#define LCASE(x) sm->Lcase(&x, x)
function TestStrings()
begin
dim as int char8=1, char16=2, all=-1;
dim as StringObject uo=NewString(0,char8);
dim as StringObject vo=NewString(0,char8);
dim as StringObject wo=NewString(100,char8);
dim as StringMethods sm=vo->StringMethods;
sm->Show(vo);
sm->SetChars(&uo,"LO",all,char8);
sm->SetChars(&vo," HellO ",all,char8);
// sm->Ltrim(&vo,vo);
LTRIM(vo);
// sm->Rtrim(&vo,vo);
RTRIM(vo);
// sm->Ucase(&vo,vo);
UCASE(vo);
StringObject c1[]={vo,vo,vo};
sm->Join(3,&wo,c1);
sm->Show(uo);
sm->Show(vo);
sm->Show(wo);
printf("%i\n",sm->Instr(6,wo,uo));
// sm->Lcase(&wo,wo);
LCASE(wo);
jrs@laptop:~/C_BASIC/cbstrlib$ ./strlib
LO
HELLO
HELLOHELLOHELLO
9
helloLOhellohello
hellohellohello
42.000000
42.000000
AbcAbcAbcAbcAbcAbcAbc
LOLOLOLOLOLOLO
AbcAbcAbcAbcAbcAbcAbc
<
>
Hello World!
<HELLO WORLD!>
<<HELLO WORLD!>>
HELLO
HELLOH
jrs@laptop:~/C_BASIC/cbstrlib$