| 1059 | } |
| 1060 | |
| 1061 | String 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 | |
| 1082 | String String::toLowerCase() const |
| 1083 | { |
no test coverage detected