devxlogo

More Efficient LPad Function for Large Padding Lengths

More Efficient LPad Function for Large Padding Lengths

 function LPad(ContentToSize,PadLength,PadChar) {     return GetRepeatedCharString(PadChar, PadLength -ContentToSize.length) + ContentToSize;}function GetRepeatedCharString(Char, Size) {	if (Size 

devx-admin

Share the Post: