Txt-Lowercase

From Vectorlab
Jump to: navigation, search


Function to return a string as lowercase. By Orso B. Schmid


{ Orso *********************************************** }
{ convert a char to lower case }
FUNCTION T_LowerCase(asciiNr: INTEGER): CHAR;
	BEGIN
		T_LowerCase := Chr(asciiNr);
		
		{ converts only if it's upper case }
		CASE asciiNr OF
			{ upper case 2 lower case }
			65..90, 192..207, 209..220:
			T_LowerCase := Chr(asciiNr + 32);
		END;
	END;