Is there any function which can cut string by letter index? I mean the X letters from the end?
!define myString "abcdefg"
I need to get for ex. "efg"
i tried to do that with nsis strings functions but didnt found what can help me. ${StrStr} and all the other functions doesnt do the work
Thanks
This is very simple. Actually, you don't have any dedicated function to do that, but you StrCpy can do that with 3rd and 4th arguments.
The format is going like that:
user_var(destination) str [maxlen] [start_offset]
And the usage for you case, is:
StrCpy $0 $myString "" -3
$0 will be: efg
More information about StrCpy function, can be found out there: http://nsis.sourceforge.net/Reference/StrCpy
StrCpy $0 "abcdefg" "" -3 ; variable $0 now has the last 3 letters
See the manual for more info about StrCpy
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With