
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6728 212acab6-be3b-0410-9dea-997c60f758d6
23 lines
987 B
Text
23 lines
987 B
Text
\S1{stringinst} String Manipulation Instructions
|
|
|
|
\S2{StrCpy} StrCpy
|
|
|
|
\c user_var(destination) str [maxlen] [start_offset]
|
|
|
|
Sets the user variable $x with str. str can contain variables (including the user variable being set (concatenating strings this way is possible, etc)). If maxlen is specified, the string will be a maximum of maxlen characters (if maxlen is negative, the string will be truncated abs(maxlen) characters from the end). If start_offset is specified, the source is offset by it (if start_offset is negative, it will start abs(start_offset) from the end of the string).
|
|
|
|
\c StrCpy $0 "a string" # = "a string"
|
|
\c StrCpy $0 "a string" 3 # = "a s"
|
|
\c StrCpy $0 "a string" -1 # = "a strin"
|
|
\c StrCpy $0 "a string" "" 2 # = "string"
|
|
\c StrCpy $0 "a string" "" -3 # = "ing"
|
|
\c StrCpy $0 "a string" 3 -4 # = "rin"
|
|
\c StrCpy $0 "$0$0" # = "rinrin"
|
|
|
|
\S2{StrLen} StrLen
|
|
|
|
\c user_var(length output) str
|
|
|
|
Sets user variable $x to the length of str.
|
|
|
|
\c StrLen $0 "123456" # = 6
|