| 1 |
/* Copyright (C) 2015 Povilas Kanapickas <[email protected]> |
| 2 |
|
| 3 |
This file is part of cppreference-doc |
| 4 |
|
| 5 |
This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 |
| 6 |
Unported License. To view a copy of this license, visit |
| 7 |
http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative |
| 8 |
Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. |
| 9 |
|
| 10 |
Permission is granted to copy, distribute and/or modify this document |
| 11 |
under the terms of the GNU Free Documentation License, Version 1.3 or |
| 12 |
any later version published by the Free Software Foundation; with no |
| 13 |
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. |
| 14 |
*/ |
| 15 |
|
| 16 |
#ifndef CPPREFERENCE_CWCHAR_H |
| 17 |
#define CPPREFERENCE_CWCHAR_H |
| 18 |
|
| 19 |
namespace std { |
| 20 |
|
| 21 |
// wide strings |
| 22 |
std::size_t wcslen(const wchar_t* str); |
| 23 |
int wcscmp(const wchar_t* lhs, const wchar_t* rhs); |
| 24 |
int wcsncmp(const wchar_t* lhs, const wchar_t* rhs, std::size_t count); |
| 25 |
int wcscoll(const wchar_t* lhs, const wchar_t* rhs); |
| 26 |
const wchar_t* wcschr(const wchar_t* str, wchar_t ch); |
| 27 |
wchar_t* wcschr(wchar_t* str, wchar_t ch); |
| 28 |
const wchar_t* wcsrchr(const wchar_t* str, wchar_t ch); |
| 29 |
wchar_t* wcsrchr(wchar_t* str, wchar_t ch); |
| 30 |
size_t wcsspn(const wchar_t* dest, const wchar_t* src); |
| 31 |
std::size_t wcscspn(const wchar_t* dest, const wchar_t* src); |
| 32 |
const wchar_t* wcspbrk(const wchar_t* dest, const wchar_t* str); |
| 33 |
wchar_t* wcspbrk(wchar_t* dest, const wchar_t* str); |
| 34 |
const wchar_t* wcsstr(const wchar_t* dest, const wchar_t* src); |
| 35 |
wchar_t* wcsstr(wchar_t* dest, const wchar_t* src); |
| 36 |
wchar_t* wcstok(wchar_t* str, const wchar_t* delim, wchar_t** ptr); |
| 37 |
|
| 38 |
wchar_t* wmemcpy(wchar_t* dest, const wchar_t* src, std::size_t count); |
| 39 |
wchar_t* wmemmove(wchar_t* dest, const wchar_t* src, std::size_t count); |
| 40 |
int wmemcmp(const wchar_t* lhs, const wchar_t* rhs, std::size_t count); |
| 41 |
const wchar_t* wmemchr(const wchar_t* ptr, wchar_t ch, std::size_t count); |
| 42 |
wchar_t* wmemchr(wchar_t* ptr, wchar_t ch, std::size_t count); |
| 43 |
wchar_t* wmemset(wchar_t* dest, wchar_t ch, std::size_t count); |
| 44 |
|
| 45 |
wchar_t* wcscpy(wchar_t* dest, const wchar_t* src); |
| 46 |
wchar_t* wcsncpy(wchar_t* dest, const wchar_t* src, std::size_t count); |
| 47 |
wchar_t* wcscat(wchar_t* dest, const wchar_t* src); |
| 48 |
wchar_t* wcsncat(wchar_t* dest, const wchar_t* src, std::size_t count); |
| 49 |
std::size_t strxfrm(wchar_t* dest, const wchar_t* src, std::size_t count); |
| 50 |
|
| 51 |
// string conversions |
| 52 |
long wcstol(const wchar_t* str, wchar_t** str_end, int base); |
| 53 |
unsigned long wcstoul(const wchar_t* str, wchar_t** str_end, int base); |
| 54 |
double wcstod(const wchar_t* str, wchar_t** str_end); |
| 55 |
#if CPPREFERENCE_STDVER> 2011 |
| 56 |
long long wcstoll(const wchar_t* str, wchar_t** str_end, int base); |
| 57 |
unsigned long long wcstoull(const wchar_t* str, wchar_t** str_end, int base); |
| 58 |
float wcstof(const wchar_t* str, wchar_t** str_end); |
| 59 |
long double wcstold(const wchar_t* str, wchar_t** str_end); |
| 60 |
#endif |
| 61 |
|
| 62 |
// multibyte strings |
| 63 |
struct mbstate_t; |
| 64 |
int mbsinit(const std::mbstate_t* ps); |
| 65 |
std::size_t mbrtowc(wchar_t* pwc, |
| 66 |
const char* s, |
| 67 |
std::size_t n, |
| 68 |
std::mbstate_t* ps); |
| 69 |
std::wint_t btowc(int c); |
| 70 |
std::size_t mbsrtowcs(wchar_t* dst, |
| 71 |
const char** src, |
| 72 |
std::size_t len, |
| 73 |
std::mbstate_t* ps); |
| 74 |
int wctob(std::wint_t c); |
| 75 |
std::size_t wcrtomb(char* s, wchar_t wc, std::mbstate_t* ps); |
| 76 |
std::size_t wcsrtombs(char* dst, |
| 77 |
const wchar_t** src, |
| 78 |
std::size_t len, |
| 79 |
std::mbstate_t* ps); |
| 80 |
std::size_t mbrlen(const char* s, std::size_t n, std::mbstate_t* ps); |
| 81 |
|
| 82 |
// input/output |
| 83 |
|
| 84 |
wint_t fgetwc(std::FILE* stream); |
| 85 |
wint_t getwc(std::FILE* stream); |
| 86 |
wchar_t* fgetws(wchar_t* str, int count, std::FILE* stream); |
| 87 |
wint_t fputwc(wchar_t ch, std::FILE* stream); |
| 88 |
wint_t putwc(wchar_t ch, std::FILE* stream); |
| 89 |
int fputws(const wchar_t* str, std::FILE* stream); |
| 90 |
wint_t getwchar(); |
| 91 |
wint_t putwchar(wchar_t ch); |
| 92 |
wint_t ungetwc(wint_t ch, std::FILE* stream); |
| 93 |
|
| 94 |
#if CPPREFERENCE_STDVER> 2011 |
| 95 |
int wscanf(const wchar_t* format, ...); |
| 96 |
int fwscanf(std::FILE* stream, const wchar_t* format, ...); |
| 97 |
int swscanf(const wchar_t* buffer, const wchar_t* format, ...); |
| 98 |
int vwscanf(const wchar_t* format, va_list vlist); |
| 99 |
int vfwscanf(std::FILE* stream, const wchar_t* format, va_list vlist); |
| 100 |
int vswscanf(const wchar_t* buffer, const wchar_t* format, va_list vlist); |
| 101 |
#endif |
| 102 |
int wprintf(const wchar_t* format, ...); |
| 103 |
int fwprintf(std::FILE* stream, const wchar_t* format, ...); |
| 104 |
int swprintf(wchar_t* buffer, std::size_t size, const wchar_t* format, ...); |
| 105 |
int vwprintf(const wchar_t* format, va_list vlist); |
| 106 |
int vfwprintf(std::FILE* stream, const wchar_t* format, va_list vlist); |
| 107 |
int vswprintf(const wchar_t* buffer, std::size_t size, const wchar_t* format, va_list vlist); |
| 108 |
|
| 109 |
} // namespace std |
| 110 |
|
| 111 |
#endif // CPPREFERENCE_CWCHAR_H |