It looks like you're new here. Sign in or register to get started.
HalMdy wrote: Something like : NewString := STRSUBSTNO('%1%2, UPPERCASE(COPYSTR(OldString,1,1)), COPYSTR(OldString,2,STRLEN(OldString)-1); Not tested, but ...
Comments
NewString := STRSUBSTNO('%1%2,
UPPERCASE(COPYSTR(OldString,1,1)),
COPYSTR(OldString,2,STRLEN(OldString)-1);
Not tested, but ...
Hi just another way, you do not need the COPYSTR for the first Charater or the STRLEN for the rest:
You can just use
MyText := COPYSTR(MyText,2);
But you do need to test the Length is not zero or one
IF STRLEN(MyText) = 1 THEN
MyText := UPPERCASE(MyText)
ELSE
IF STRLEN(MyText) > 1 THEN
MYTEXT:=UPPERCASE(MyText[1]) + COPYSTR(MyText,2);
Same result but Different code!
HalMdy example could convert to
NewString := STRSUBSTNO('%1%2,UPPERCASE(OldString[1]),COPYSTR(OldString,2);
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
Rgrds
Ufuk
Pargesoft