Reference/StrCpy: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
(Created page with "=StrCpy= user_var(destination) str [maxlen] [start_offset] Sets the user variable $x with str. Note that str can contain other variables, or the user variable being set (conca...") |
mNo edit summary |
||
Line 11: | Line 11: | ||
StrCpy $0 "a string" "" -3 # = "ing" | StrCpy $0 "a string" "" -3 # = "ing" | ||
StrCpy $0 "a string" 3 -4 # = "rin"</highlight-nsis> | StrCpy $0 "a string" 3 -4 # = "rin"</highlight-nsis> | ||
''Command introduced with NSIS v1.2g'' |
Revision as of 20:20, 4 June 2013
StrCpy
user_var(destination) str [maxlen] [start_offset]
Sets the user variable $x with str. Note that str can contain other variables, or 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).
StrCpy $0 "a string" # = "a string" StrCpy $0 "a string" 3 # = "a s" StrCpy $0 "a string" -1 # = "a strin" StrCpy $0 "a string" "" 2 # = "string" StrCpy $0 "a string" "" -3 # = "ing" StrCpy $0 "a string" 3 -4 # = "rin"
Command introduced with NSIS v1.2g