AUTOHOTKEY/스크립트
숫자에 콤마 찍기
님투
2007. 10. 23. 15:34
반응형
;------------------------------------------------------------- ; 숫자에 컴마 찍기 ;------------------------------------------------------------- FormatNumber(_number) { StringReplace _number, _number, - IfEqual ErrorLevel,0, SetEnv Sign,- Loop Parse, _number, . If (A_Index = 1) { len := StrLen(A_LoopField) Loop Parse, A_LoopField If (Mod(len-A_Index,3) = 0 and A_Index != len) x = %x%%A_LoopField%, Else x = %x%%A_LoopField% } Else Return Sign x "." A_LoopField Return Sign x }
반응형