X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fmarkup-processor-helper-functions.cpp;h=6c133ae839d4bef4f08615a868f16af38d8c175c;hp=8af61408f348ccb5c5506731dcd89d1d2ecc19ef;hb=528aa3699cd51dab5115bca1aaebb65d4bc67c15;hpb=f4c1e7f52d49c3ce033b9ee4c3c7414b06a22d45 diff --git a/dali-toolkit/internal/text/markup-processor-helper-functions.cpp b/dali-toolkit/internal/text/markup-processor-helper-functions.cpp old mode 100644 new mode 100755 index 8af6140..6c133ae --- a/dali-toolkit/internal/text/markup-processor-helper-functions.cpp +++ b/dali-toolkit/internal/text/markup-processor-helper-functions.cpp @@ -92,6 +92,11 @@ void JumpToWhiteSpace( const char*& stringBuffer, for( ; ( WHITE_SPACE != *stringBuffer ) && ( stringBuffer < stringEndBuffer ); ++stringBuffer ); } +unsigned int StringToUint( const char* const uintStr ) +{ + return static_cast( strtoul( uintStr, NULL, 10 ) ); +} + unsigned int StringToHex( const char* const uintStr ) { return static_cast( strtoul( uintStr, NULL, 16 ) ); @@ -109,6 +114,13 @@ void FloatToString( float value, std::string& floatStr ) floatStr = ss.str(); } +void UintToString( unsigned int value, std::string& uIntStr ) +{ + std::stringstream ss; + ss << value; + uIntStr = ss.str(); +} + void UintColorToVector4( unsigned int color, Vector4& retColor ) { retColor.a = static_cast( ( color & 0xFF000000 ) >> 24u ) / 255.f;