NavWithNav

The premier knowledge-sharing hub for Microsoft Dynamics 365 Business Central developers, architects, and ERP professionals.

Back to Series
Uncategorized

Convert each word's first letter in Capital

<b>Convert each word's first letter in Capital</b> <b>Below is the code</b> <b>Name DataType Subtype Length</b> <b>nametext Text </b> <b>newtext Text </b> <b>ucase Text </b> <b>textl...

NitinSeptember 23, 2022 1 min read
Business CentralMicrosoft DynamicsERPDevelopment
Convert each word's first letter in Capital
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);  
   
0
0

Discussion (0)

Leave a comment

No comments yet. Be the first to share your thoughts!

Newsletter

Stay updated with the latest Business Central development tips.

Nitin Verma

Nitin Verma

Solution Architect

Extensive experience specializing in Microsoft Dynamics NAV, Business Central, Power Platform, and ERP Architecture.

Read full bio

Search Articles

Monthly Archive

Loading...

Visitor Stats