summaryrefslogtreecommitdiff
path: root/src/stable/string.cpp
diff options
context:
space:
mode:
authorMike Buland <mbuland@penny-arcade.com>2019-04-18 19:09:04 -0700
committerMike Buland <mbuland@penny-arcade.com>2019-04-18 19:09:04 -0700
commit62753c815b5ec34ebfae37a3c89187a01cc17160 (patch)
treed6f85d4af7d54c88a7486a3207c33a168ae09bd8 /src/stable/string.cpp
parentd81e824732c33e2d5ce31fbc58571561a8d9b21f (diff)
downloadlibbu++-62753c815b5ec34ebfae37a3c89187a01cc17160.tar.gz
libbu++-62753c815b5ec34ebfae37a3c89187a01cc17160.tar.bz2
libbu++-62753c815b5ec34ebfae37a3c89187a01cc17160.tar.xz
libbu++-62753c815b5ec34ebfae37a3c89187a01cc17160.zip
Minor quality of life additions to string and variant.
More coming to string. I need to figure some things out in variant.
Diffstat (limited to '')
-rw-r--r--src/stable/string.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/stable/string.cpp b/src/stable/string.cpp
index ce679fe..3029584 100644
--- a/src/stable/string.cpp
+++ b/src/stable/string.cpp
@@ -964,6 +964,25 @@ Bu::String Bu::String::toUpper() const
964 return sRet; 964 return sRet;
965} 965}
966 966
967int16_t Bu::String::toInt16( int iRadix ) const
968{
969 flatten();
970 return strtol( core->pFirst->pData, NULL, iRadix );
971}
972
973int32_t Bu::String::toInt32( int iRadix ) const
974{
975 flatten();
976 return strtol( core->pFirst->pData, NULL, iRadix );
977}
978
979int64_t Bu::String::toInt64( int iRadix ) const
980{
981 flatten();
982 return strtoll( core->pFirst->pData, NULL, iRadix );
983}
984
985
967Bu::String::const_iterator Bu::String::find( const char cChar, 986Bu::String::const_iterator Bu::String::find( const char cChar,
968 Bu::String::const_iterator iStart ) const 987 Bu::String::const_iterator iStart ) const
969{ 988{