wchar.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <stddef.h>
  8. #include <sys/cdefs.h>
  9. __BEGIN_DECLS
  10. #ifndef WEOF
  11. # define WEOF (0xffffffffu)
  12. #endif
  13. typedef __WINT_TYPE__ wint_t;
  14. typedef unsigned long int wctype_t;
  15. typedef struct {
  16. unsigned char bytes[4];
  17. } mbstate_t;
  18. size_t wcslen(const wchar_t*);
  19. wchar_t* wcscpy(wchar_t*, const wchar_t*);
  20. wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t);
  21. int wcscmp(const wchar_t*, const wchar_t*);
  22. int wcsncmp(const wchar_t*, const wchar_t*, size_t);
  23. wchar_t* wcschr(const wchar_t*, int);
  24. const wchar_t* wcsrchr(const wchar_t*, wchar_t);
  25. wchar_t* wcscat(wchar_t*, const wchar_t*);
  26. wchar_t* wcsncat(wchar_t*, const wchar_t*, size_t);
  27. wchar_t* wcstok(wchar_t*, const wchar_t*, wchar_t**);
  28. long wcstol(const wchar_t*, wchar_t**, int);
  29. long long wcstoll(const wchar_t*, wchar_t**, int);
  30. wint_t btowc(int c);
  31. size_t mbrtowc(wchar_t*, const char*, size_t, mbstate_t*);
  32. size_t mbrlen(const char*, size_t, mbstate_t*);
  33. size_t wcrtomb(char*, wchar_t, mbstate_t*);
  34. int wcscoll(const wchar_t*, const wchar_t*);
  35. int wctob(wint_t);
  36. int mbsinit(const mbstate_t*);
  37. wchar_t* wcspbrk(const wchar_t*, const wchar_t*);
  38. wchar_t* wcsstr(const wchar_t*, const wchar_t*);
  39. wchar_t* wmemchr(const wchar_t*, wchar_t, size_t);
  40. wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t);
  41. wchar_t* wmemset(wchar_t*, wchar_t, size_t);
  42. wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t);
  43. unsigned long wcstoul(const wchar_t*, wchar_t**, int);
  44. unsigned long long wcstoull(const wchar_t*, wchar_t**, int);
  45. float wcstof(const wchar_t*, wchar_t**);
  46. double wcstod(const wchar_t*, wchar_t**);
  47. long double wcstold(const wchar_t*, wchar_t**);
  48. __END_DECLS