Last active
February 25, 2020 13:00
-
-
Save 0x04/ae41d3fb3a7cf9a1136ec2130d553d60 to your computer and use it in GitHub Desktop.
This file contains 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
package com.utils | |
{ | |
public class StringUtil { | |
static public function padStart(string:String, length:uint, padString:String = ' '):String { | |
var insert:String = ''; | |
for (var i:int = 0; i < length; i++) { | |
insert += padString; | |
} | |
return insert + string; | |
} | |
} | |
} |
Author
0x04
commented
Feb 25, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment