From cca5439be1d772e67b7f5d48db572df90b02d41e Mon Sep 17 00:00:00 2001 From: Leonetienne Date: Mon, 14 Mar 2022 12:17:15 +0100 Subject: Added padding functionality --- Src/StringTools.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Src/StringTools.h') diff --git a/Src/StringTools.h b/Src/StringTools.h index d65772a..e8de59d 100644 --- a/Src/StringTools.h +++ b/Src/StringTools.h @@ -29,6 +29,12 @@ public: //! Will split a string by a string seperator static std::vector Split(const std::string& str, const std::string& seperator); + //! Will pad a string to the left to length l + static std::string PadLeft(const std::string& str, const char pad, const std::size_t len); + + //! Will pad a string to the right to length l + static std::string PadRight(const std::string& str, const char pad, const std::size_t len); + private: // No instanciation! >:( StringTools(); -- cgit v1.2.3