void * Unicode_GetAllocBytes(ConstUnicode str, // IN: StringEncoding encoding) // IN: { if (str == NULL) { return NULL; } return UnicodeGetAllocBytesInternal(str, encoding, -1, NULL); }
void * Unicode_GetAllocBytesWithLength(ConstUnicode str, // IN: StringEncoding encoding, // IN: ssize_t lengthInBytes) // IN: { if (str == NULL) { return NULL; } ASSERT(lengthInBytes >= 0); return UnicodeGetAllocBytesInternal(str, encoding, lengthInBytes, NULL); }
Bool Unicode_CanGetBytesWithEncoding(ConstUnicode ustr, // IN: StringEncoding encoding) // IN: { void *tmp; if (ustr == NULL) { return TRUE; } tmp = UnicodeGetAllocBytesInternal(ustr, encoding, -1, NULL); if (tmp == NULL) { return FALSE; } free(tmp); return TRUE; }