diff options
author | Mike Buland <mbuland@penny-arcade.com> | 2019-04-18 19:09:04 -0700 |
---|---|---|
committer | Mike Buland <mbuland@penny-arcade.com> | 2019-04-18 19:09:04 -0700 |
commit | 62753c815b5ec34ebfae37a3c89187a01cc17160 (patch) | |
tree | d6f85d4af7d54c88a7486a3207c33a168ae09bd8 /src/stable/string.cpp | |
parent | d81e824732c33e2d5ce31fbc58571561a8d9b21f (diff) | |
download | libbu++-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 'src/stable/string.cpp')
-rw-r--r-- | src/stable/string.cpp | 19 |
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 | ||
967 | int16_t Bu::String::toInt16( int iRadix ) const | ||
968 | { | ||
969 | flatten(); | ||
970 | return strtol( core->pFirst->pData, NULL, iRadix ); | ||
971 | } | ||
972 | |||
973 | int32_t Bu::String::toInt32( int iRadix ) const | ||
974 | { | ||
975 | flatten(); | ||
976 | return strtol( core->pFirst->pData, NULL, iRadix ); | ||
977 | } | ||
978 | |||
979 | int64_t Bu::String::toInt64( int iRadix ) const | ||
980 | { | ||
981 | flatten(); | ||
982 | return strtoll( core->pFirst->pData, NULL, iRadix ); | ||
983 | } | ||
984 | |||
985 | |||
967 | Bu::String::const_iterator Bu::String::find( const char cChar, | 986 | Bu::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 | { |