Skip to content

Instantly share code, notes, and snippets.

@RhinoLu
Created December 1, 2015 11:26
Show Gist options
  • Save RhinoLu/ee089f38b77cb336ba11 to your computer and use it in GitHub Desktop.
Save RhinoLu/ee089f38b77cb336ba11 to your computer and use it in GitHub Desktop.
補零
function addZero(str: string, length: number): string {
return new Array(length - str.length + 1).join("0") + str;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment