Skip to content
⌘ NSIS Forum Archive

LeftStr or StrLeft

3 posts

yehiaeg#

LeftStr or StrLeft

Hello,

anyone have function that gets the first n characters of a string just like leftstr in vb or strleft in delphi:

x := strleft("Hello my name is",3 ); x would be "Hel"

Thanks In Advance
Yehia
RobGrant#


Probably worth at least trying the docs.
Afrow UK#
StrCpy $R0 "hello" 4
; $R0 = "hell"

StrCpy $R0 "hello" "" -4
; $R0 = "ello"

StrCpy $R0 "hello" "" 4
; $R0 = "o"

StrCpy $R0 "hello" -4
; $R0 = "h"

-Stu