Convert each word's first letter in Capital
Below is the code
Name DataType Subtype Length
nametext Text
newtext Text
ucase Text
textlen Integer
Convertext Text
nametext := 'first letter of this line going to be converted in Capital.';
WHILE STRPOS(nametext,' ') <> 0 DO BEGIN
newtext := UPPERCASE(COPYSTR(COPYSTR(nametext,1,STRPOS(nametext,' ')-1),1,1));
newtext += LOWERCASE(COPYSTR(nametext,2,STRPOS(nametext,' ')-2)) + ' ';
Convertext += newtext;
textlen := STRLEN(newtext);
nametext := DELSTR(nametext,1,textlen);
END;
ucase := UPPERCASE(COPYSTR(nametext,1,1));
ucase += LOWERCASE(COPYSTR(nametext,2,STRLEN(nametext)));
MESSAGE(Convertext+ucase);