This file contains hidden or 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
String.prototype.trimEnd = function(c) { | |
if (this.length == 0) return this; | |
c = c ? c : ' '; | |
var i = this.length - 1; | |
for (; i >= 0 && this.charAt(i) == c; i--); | |
return this.substring(0, i + 1); | |
} | |
// Example |
This file contains hidden or 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
String.prototype.trimStart = function(c) { | |
if (this.length == 0) return this; | |
c = c ? c : ' '; | |
var i = 0; | |
for (; i < this.length && this.charAt(i) == c; i++); | |
return this.substring(i); | |
} | |
// Example |
This file contains hidden or 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
@echo off | |
echo Commit on GitHub/GitLab | |
echo. | |
set /p comment="Enter comment: " | |
git.exe add . | |
git.exe commit -m "%comment%" | |
git.exe push |
NewerOlder