[futurebasic] Re: [FB] FN LCASE$

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 2001 : Group Archive : Group : All Groups

From: Jay Reeve <jktr@...>
Date: Fri, 26 Oct 01 08:57:58 -0500
/*
>1. Someone mentioned DEF LCASE( s$ ) This converts the given string
>to  lower case. However, it is an instruction by itself and can't be
>used  within a PRINT or other instruction like a function. Also, it
>operates  directly on the parameter so care sometimes is needed to
>preserve the original string

Stu,

While not as much fun, here's another simple solution to those concerns that retains DEF LCASE's ability to deal with the entire char set:
*/

' ----- BEGIN FB^3 CODE -------

LOCAL FN LCASE$( theStr as str255 )
DEF LCASE(theStr)
END FN = theStr

DIM myStr AS STR255

myStr = "THIS IS A TEST OF THE LOWER CASE FUNCTION: "

PRINT fn LCASE$( myStr )+"""" + fn LCASE$( "ÑÜÅÇÉ" ) + """"'Add strings

'-------END CODE ---------