From f89f308c525e9deebc6d2cf6416e27dfe1a299dc Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Sun, 19 May 2019 16:03:38 +0200 Subject: Cleanup DiscoBot Project --- DSACore/Auxiliary/Extensions.cs | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'DSACore/Auxiliary/Extensions.cs') diff --git a/DSACore/Auxiliary/Extensions.cs b/DSACore/Auxiliary/Extensions.cs index 8ef6298..f8e9d8e 100644 --- a/DSACore/Auxiliary/Extensions.cs +++ b/DSACore/Auxiliary/Extensions.cs @@ -6,14 +6,10 @@ //If the original string is already longer, it is returner unmodified. public static string AddSpaces(this string str, int length) { - string temp = str; - for(int i = str.Length; i < length; i++) - { - temp += " "; - } + var temp = str; + for (var i = str.Length; i < length; i++) temp += " "; return temp; } - //This mehod extends string. @@ -21,13 +17,9 @@ //If the original string is already longer, it is returner unmodified. public static string AddSpacesAtHead(this string str, int length) { - string temp = ""; - for (int i = str.Length; i < length; i++) - { - temp += " "; - } + var temp = ""; + for (var i = str.Length; i < length; i++) temp += " "; return temp + str; } } - -} +} \ No newline at end of file -- cgit v1.2.3-54-g00ecf