| | |
| | | }
|
| | |
|
| | | /**
|
| | | * Returns a trimmed shortlog message.
|
| | | * |
| | | * @param string
|
| | | * @return trimmed shortlog message
|
| | | */
|
| | | public static String trimShortLog(String string) {
|
| | | return trimString(string, 60);
|
| | | }
|
| | |
|
| | | /**
|
| | | * Left pad a string with the specified character, if the string length is
|
| | | * less than the specified length.
|
| | | *
|
| | |
| | | String bs = Integer.toHexString((int) (b * 256));
|
| | | return "#" + rs + gs + bs;
|
| | | }
|
| | | |
| | | public static String stripDotGit(String value) {
|
| | | if (value.toLowerCase().endsWith(".git")) {
|
| | | return value.substring(0, value.length() - 4);
|
| | | }
|
| | | return value;
|
| | | }
|
| | | |
| | | public static int countLines(String value) {
|
| | | if (isEmpty(value)) {
|
| | | return 0;
|
| | | }
|
| | | return value.split("\n").length;
|
| | | }
|
| | | } |