00001 #ifndef EXTRAS_STRING_H
00002 #define EXTRAS_STRING_H
00003
00004
00005
00006 #include <cstdio>
00007
00010 inline string& operator += (string& c, int n) {
00011 char cad[20];
00012 sprintf(cad, "%d", n);
00013 return c += cad;
00014 }
00015
00018 inline string operator + (string c, int n) {
00019 return c += n;
00020 }
00021
00024 inline string operator + (int n, string const& c) {
00025 char cad[20];
00026 sprintf(cad, "%d", n);
00027 return cad + c;
00028 }
00029
00030 #endif // EXTRAS_STRING_H