From 73605b44ea545e09efa3941098106ac013184eb7 Mon Sep 17 00:00:00 2001 From: Demis Bellot Date: Wed, 27 Jan 2021 14:09:22 +0800 Subject: [PATCH] Clean source code --- src/main/kotlin/net/servicestack/gistcafe/Inspect.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/net/servicestack/gistcafe/Inspect.kt b/src/main/kotlin/net/servicestack/gistcafe/Inspect.kt index 92f7ad1..b433e11 100644 --- a/src/main/kotlin/net/servicestack/gistcafe/Inspect.kt +++ b/src/main/kotlin/net/servicestack/gistcafe/Inspect.kt @@ -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 { @@ -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 {