1
0

strings.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #ifndef _NULLSOFT_WINAMP_ML_DEVICES_STRINGS_HEADER
  2. #define _NULLSOFT_WINAMP_ML_DEVICES_STRINGS_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #define IS_STRING_EMPTY(_string) (NULL == (_string) || L'\0' == *(_string))
  7. wchar_t *
  8. String_Malloc(size_t size);
  9. wchar_t *
  10. String_ReAlloc(wchar_t *string,
  11. size_t size);
  12. void
  13. String_Free(wchar_t *string);
  14. wchar_t *
  15. String_Duplicate(const wchar_t *string);
  16. char *
  17. String_ToAnsi(unsigned int codePage,
  18. unsigned long flags,
  19. const wchar_t *string,
  20. int stringLength,
  21. const char *defaultChar,
  22. BOOL *usedDefaultChar);
  23. size_t
  24. String_CopyTo(wchar_t *destination,
  25. const wchar_t *source,
  26. size_t size);
  27. /*
  28. Ansi String
  29. */
  30. char *
  31. AnsiString_Malloc(size_t size);
  32. char *
  33. AnsiString_ReAlloc(char *string,
  34. size_t size);
  35. void
  36. AnsiString_Free(char *string);
  37. char *
  38. AnsiString_Duplicate(const char *string);
  39. wchar_t *
  40. AnsiString_ToUnicode(unsigned int codePage,
  41. unsigned long flags,
  42. const char *string,
  43. int stringLength);
  44. /*
  45. Resource String
  46. */
  47. wchar_t*
  48. ResourceString_Duplicate(const wchar_t *source);
  49. void
  50. ResourceString_Free(wchar_t *string);
  51. size_t
  52. ResourceString_CopyTo(wchar_t *destination,
  53. const wchar_t *source,
  54. size_t size);
  55. #endif //_NULLSOFT_WINAMP_ML_DEVICES_PLUGIN_STRINGS_HEADER