MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / toUpperCase

Method toUpperCase

src/String.cpp:1061–1080  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1059}
1060
1061String String::toUpperCase() const
1062{
1063 #ifdef HX_SMART_STRINGS
1064 if (isUTF16Encoded())
1065 {
1066 char16_t *result = String::allocChar16Ptr(length);
1067 for(int i=0;i<length;i++)
1068 {
1069 // Surrogates should already may to themselves - no need to check
1070 result[i] = unicase_toupper( __w[i] );
1071 }
1072 return String(result,length);
1073 }
1074 #endif
1075
1076 char *result = hx::NewString(length);
1077 for(int i=0;i<length;i++)
1078 result[i] = toupper( __s[i] );
1079 return String(result,length);
1080}
1081
1082String String::toLowerCase() const
1083{

Callers 2

runStringMethod · 0.80
strToCaseMethod · 0.80

Calls 4

isUTF16EncodedFunction · 0.85
unicase_toupperFunction · 0.85
NewStringFunction · 0.85
StringClass · 0.50

Tested by

no test coverage detected