Add Spaces to a String

samemerysamemery Member Posts: 60
Hi,

Is it possible to add spaces to the end of the string?

String := String + ' ';

The String doesn't save the space at the end of the string. Any ideas?

Thank you.

Comments

  • ara3nara3n Member Posts: 9,256
    String := 'Hello';
    String := String + ' ';
    
    
    MESSAGE( String + 'Test');
    


    You mean the message that opens up is not
    Hello Test
    
    ?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • kinekine Member Posts: 12,562
    If the "String" is of type Code, the leading and trailing spaces are removed automatically...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • samemerysamemery Member Posts: 60
    So what I did was use INSSTR to insert underscores where I wanted spaces. Then at the end I used the CONVERTSTR to convert those underscores to spaces.
Sign In or Register to comment.