mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
24 lines
No EOL
481 B
JavaScript
Executable file
24 lines
No EOL
481 B
JavaScript
Executable file
define([
|
|
],
|
|
|
|
function () {
|
|
|
|
"use strict";
|
|
|
|
String.prototype.toUpperCaseFirstChar = function () {
|
|
var f = this.charAt(0).toUpperCase();
|
|
return f + this.substr(1);
|
|
}
|
|
|
|
String.prototype.pad = function (max, alignLeft) {
|
|
var string = this.substring(0, max - 1);
|
|
|
|
var spaces = new Array( max - string.length + 1 ).join(" ");
|
|
if(alignLeft) {
|
|
return string + spaces;
|
|
} else {
|
|
return spaces + string;
|
|
}
|
|
}
|
|
|
|
}); |