sources/mystring.cpp

changeset 66
bd28a5730fd0
parent 14
33b8f428bacb
child 69
eb4c25284a19
--- a/sources/mystring.cpp	Tue Dec 16 04:08:31 2014 +0200
+++ b/sources/mystring.cpp	Tue Dec 16 23:49:11 2014 +0200
@@ -442,6 +442,16 @@
 // -------------------------------------------------------------------------------------------------
 //
 METHOD
+String::from_number (short int a) -> String
+{
+	char buf[32];
+	::sprintf (buf, "%d", a);
+	return String (buf);
+}
+
+// -------------------------------------------------------------------------------------------------
+//
+METHOD
 String::from_number (int a) -> String
 {
 	char buf[32];
@@ -452,7 +462,7 @@
 // -------------------------------------------------------------------------------------------------
 //
 METHOD
-String::from_number (long a) -> String
+String::from_number (long int a) -> String
 {
 	char buf[32];
 	::sprintf (buf, "%ld", a);
@@ -462,7 +472,27 @@
 // -------------------------------------------------------------------------------------------------
 //
 METHOD
-String::from_number (unsigned long a) -> String
+String::from_number (unsigned short int a) -> String
+{
+	char buf[32];
+	::sprintf (buf, "%u", a);
+	return String (buf);
+}
+
+// -------------------------------------------------------------------------------------------------
+//
+METHOD
+String::from_number (unsigned int a) -> String
+{
+	char buf[32];
+	::sprintf (buf, "%u", a);
+	return String (buf);
+}
+
+// -------------------------------------------------------------------------------------------------
+//
+METHOD
+String::from_number (unsigned long int a) -> String
 {
 	char buf[32];
 	::sprintf (buf, "%lu", a);

mercurial