Archive: Looking for a String function


Looking for a String function
Is there a String function that read within it...?
Fo example:
If I have this string "Installer"
I wanna display only the string "sta" from that String...


Appendix B has function StrStr which allows you to test if 'sta' is a substring of 'Installer'.

I'm not clear on what you want, but thought I would offer this, just in case it fits.

Lilla


Push "Installer"
Push "sta"
Call StrStr
Pop $0
StrCmp $0 "" +2 +6

Using StrStr (off NSIS documentation) the output will be "" if "sta" was not found within it. Otherwise, the output will be "staller".
I have used StrStr a LOT throughout my NSIS aps.
http://myweb.tiscali.co.uk/imker/map...appackager.txt
There are a lot of good functions in there (some ones off NSIS archive)

-Stu


String functions can be found here: http://nsis.sourceforge.net/archive/...instances=0,11


And if, as I understand, you just want to copy 3 characters from the third letter in a string use:

StrCpy $0 "installer" 3 3


Thanks everyone :D
Actually, I will use all your suggestions....
Thanks
:)