summaryrefslogtreecommitdiff
path: root/DiscoBot/Auxiliary
diff options
context:
space:
mode:
authorKobert-P <kassiaK@yahoo.de>2018-06-11 16:49:40 +0200
committerKobert-P <kassiaK@yahoo.de>2018-06-11 16:49:40 +0200
commitff80592d541c79653ef0a7c04e0938d7249069ef (patch)
tree82c4aea97c2ab2e00b35d84b3e1a065608f4ac67 /DiscoBot/Auxiliary
parent19fd05a2990ec309a3869d61a6bcf48aba4793dd (diff)
Neu: !list held + !list waffe Verbesserung
Diffstat (limited to 'DiscoBot/Auxiliary')
-rw-r--r--DiscoBot/Auxiliary/Extensions.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/DiscoBot/Auxiliary/Extensions.cs b/DiscoBot/Auxiliary/Extensions.cs
index 2176129..a1d58fa 100644
--- a/DiscoBot/Auxiliary/Extensions.cs
+++ b/DiscoBot/Auxiliary/Extensions.cs
@@ -13,5 +13,20 @@
}
return temp;
}
+
+
+
+ //This mehod extends string.
+ //It adds spaces at the HEAD of a string until a fixed length is reached.
+ //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 += " ";
+ }
+ return temp + str;
+ }
}
}