-----------------------------------------------------------------------------
| 148 | |
| 149 | //----------------------------------------------------------------------------- |
| 150 | const U32 convertUTF16toUTF32(const UTF16 *unistring, UTF32 *outbuffer, U32 len) |
| 151 | { |
| 152 | AssertFatal(len >= 1, "Buffer for unicode conversion must be large enough to hold at least the null terminator."); |
| 153 | PROFILE_START(convertUTF16toUTF32); |
| 154 | U32 walked, nCodepoints; |
| 155 | |
| 156 | nCodepoints=0; |
| 157 | while( *unistring != '\0' && nCodepoints < len ) |
| 158 | { |
| 159 | walked=1; |
| 160 | outbuffer[nCodepoints] = oneUTF16toUTF32(unistring,&walked); |
| 161 | unistring += walked; |
| 162 | nCodepoints++; |
| 163 | } |
| 164 | |
| 165 | nCodepoints = getMin(nCodepoints,len); |
| 166 | outbuffer[nCodepoints] = '\0'; |
| 167 | |
| 168 | PROFILE_END(); |
| 169 | return nCodepoints; |
| 170 | } |
| 171 | |
| 172 | //----------------------------------------------------------------------------- |
| 173 | const U32 convertUTF32toUTF8( const UTF32 *unistring, UTF8 *outbuffer, U32 len) |
nothing calls this directly
no test coverage detected