Created
November 15, 2017 13:23
-
-
Save db93n2/53232e6360b2fb48fd5be6a737384a6a to your computer and use it in GitHub Desktop.
(autohotkey) - truncate a string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
truncate(string, at, divider=" . . . . ") { | |
if (strLen(string) > at) | |
string := subStr(string, 1, at/2) . divider . subStr(string, -at/2) | |
return string | |
} |
Author
db93n2
commented
Nov 15, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment