From 78fdedf06fd7e71995ad534206191ba7cab6077c Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sat, 1 Oct 2016 12:03:11 +0200 Subject: [PATCH] base: add operator for char + String --- src/lol/base/string.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lol/base/string.h b/src/lol/base/string.h index 68366ac0..654444c5 100644 --- a/src/lol/base/string.h +++ b/src/lol/base/string.h @@ -1,7 +1,7 @@ // // Lol Engine // -// Copyright © 2010—2015 Sam Hocevar +// Copyright © 2010—2016 Sam Hocevar // © 2013—2015 Benjamin “Touky” Huet // // Lol Engine is free software. It comes without any warranty, to @@ -331,6 +331,11 @@ public: static String vformat(char const *format, va_list ap); }; +inline String operator +(char c, String const &s) +{ + return String() + c + s; +} + inline String operator +(char const *sz, String const &s) { return String(sz) + s;