Weneedu 2020. 5. 10. 00:05

from wordpress

 

20200314 1806

01 "2020.03.12 07:14" ⇒ "20200312"로 바꾸고 싶다
zTime:="2020.03.12 07:14"
zTime:=SubStr(zTime,1,10)
StringReplace, zNewTime, zTime,.,,All
msgbox,% zNewTime

02 "2020.03.12 07:14" ⇒ "20200312 0714"로 바꾸고 싶다
zTime:="2020.03.12 07:14"
StringReplace, zTime, zTime,.,,All
StringReplace, zTime, zTime,:,,All
msgbox,% zTime

03 "2020.03.12 07:14" ⇒ "202003120714"인 숫자로 바꾸고 싶다
zTime:="2020.03.12 07:14"
StringReplace, zTime, zTime,.,,All
StringReplace, zTime, zTime,:,,All
StringReplace, zTime, zTime,%A_Space%,,All
zAns:=zTime+100
msgbox,% zAns

04 Other String Functions
Length := StrLen(String)
StringLeft, OutputVar, InputVar, Count
StringRight, OutputVar, InputVar, Count
StringMid, OutputVar, InputVar, StartChar [, Count, L]
Source := "Hello this is a test."
StringMid, the_word_this, Source, 7, 4a

05 ASCI codes
site = "https://en.wikipedia.org/wiki/List_of_Unicode_characters"


code sample
msgbox, chr(37) ", " chr(35)

06 String In, String Replace SubString