134b4150bab02ad5b9a798b1f6bbbe0f96c6c7d3
[platform/framework/web/crosswalk-tizen.git] /
1 define(['../lang/toString', './repeat'], function(toString, repeat) {
2
3     /**
4      * Pad string with `char` if its' length is smaller than `minLen`
5      */
6     function lpad(str, minLen, ch) {
7         str = toString(str);
8         ch = ch || ' ';
9
10         return (str.length < minLen) ?
11             repeat(ch, minLen - str.length) + str : str;
12     }
13
14     return lpad;
15
16 });