Skip to content

Instantly share code, notes, and snippets.

@monkianer
Last active May 26, 2016 04:57
Show Gist options
  • Save monkianer/72ed8ebfff66f6ac1206 to your computer and use it in GitHub Desktop.
Save monkianer/72ed8ebfff66f6ac1206 to your computer and use it in GitHub Desktop.
Add Line Break Every {numbers} Characters
// 10 可以更換成為其他數字(例: .{.20} 即為每20個字元換行)
// 以下例子是以每10個字元換行
string.replace(/(.{10})/g, "$1\n");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment