Skip to content

Commit

Permalink
Clean source code
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Jan 27, 2021
1 parent 4c7424d commit 73605b4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/kotlin/net/servicestack/gistcafe/Inspect.kt
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ class Inspect {

private fun alignLeft(str: String, len: Int, pad: String = " ") : String {
if (len < 0) return "";
val alen = len + 1 - str.length;
if (alen <= 0) return str;
return pad + str + (pad.repeat(len + 1 - str.length));
val aLen = len + 1 - str.length;
if (aLen <= 0) return str;
return pad + str + (pad.repeat(aLen));
}

fun alignCenter(str: String, len: Int, pad: String = " ") : String {
Expand All @@ -172,9 +172,9 @@ class Inspect {

private fun alignRight(str: String, len: Int, pad: String = " ") : String {
if (len < 0) return ""
val alen = len + 1 - str.length
if (alen <= 0) return str
return pad.repeat(len + 1 - str.length) + str + pad
val aLen = len + 1 - str.length
if (aLen <= 0) return str
return pad.repeat(aLen) + str + pad
}

fun alignAuto(obj: Any?, len: Int, pad: String = " ") : String {
Expand Down

0 comments on commit 73605b4

Please sign in to comment.