2efd9c882ecd49afd0e9f5ff67b761d896adf7e4
[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 rpad(str, minLen, ch) {
7         str = toString(str);
8         ch = ch || ' ';
9         return (str.length < minLen)? str + repeat(ch, minLen - str.length) : str;
10     }
11
12     return rpad;
13
14 });