From 62753c815b5ec34ebfae37a3c89187a01cc17160 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 18 Apr 2019 19:09:04 -0700 Subject: Minor quality of life additions to string and variant. More coming to string. I need to figure some things out in variant. --- src/stable/string.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/stable/string.cpp') 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 return sRet; } +int16_t Bu::String::toInt16( int iRadix ) const +{ + flatten(); + return strtol( core->pFirst->pData, NULL, iRadix ); +} + +int32_t Bu::String::toInt32( int iRadix ) const +{ + flatten(); + return strtol( core->pFirst->pData, NULL, iRadix ); +} + +int64_t Bu::String::toInt64( int iRadix ) const +{ + flatten(); + return strtoll( core->pFirst->pData, NULL, iRadix ); +} + + Bu::String::const_iterator Bu::String::find( const char cChar, Bu::String::const_iterator iStart ) const { -- cgit v1.2.3