0

string trim

Is there a way to trim a string to the first x letters.  For example if you have someLongWord grab the first 4 letters "some".

Thanks,

2 comments

  • 0
    Avatar
    Romeo

    Hi Dan,

    Please see the below example using the "Left" function to return the first 4 characters from a string and output from the debugger:

    BrightScript Debugger> result = Left("someLongWord", 4)
    BrightScript Debugger> ?result
    some

    Regards,

    Romeo

     

     

  • 0
    Avatar
    Dan James

    That works.  Thanks Romeo!

Please sign in to leave a comment.