It looks like you're new here. Sign in or register to get started.
IF mystring[strlen(mystring)-1] = 'H' then
Comments
1. Find out the string length
2. find the second to the last character (length - 2)
3. Compare it with your value using copy string.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
I have one string and i just want to check weather second last character is H or not ??
There is not at all to do this with only one IF condition ??
If copystr(String,(strlen(string)-2),1) = 'H' then
blah blah blah
Is it really that important to put it all in one IF statement? Are you being tested or something?
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
Of course working just if mystring has two or more characters (you must test it before using it in live environ.)...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I had done this with copystr, i copy the char with this and company it with h or H, and it's work
Thanks to give valuable time for this query..