ReactOS
0.4.16-dev-1946-g52006dd
wcsrev.cpp
Go to the documentation of this file.
1
//
2
// wcsrev.cpp
3
//
4
// Copyright (c) Microsoft Corporation. All rights reserved.
5
//
6
// Defines _wcsrev(), which reverses a wide chraacter string in place. The
7
// pointer to the string is returned.
8
//
9
#include <string.h>
10
11
12
13
extern
"C"
wchar_t
*
__cdecl
_wcsrev
(
wchar_t
*
const
string
)
14
{
15
// Find the end of the string:
16
wchar_t
*
right
=
string
;
17
while
(*
right
++) { }
18
right
-= 2;
19
20
// Reverse the strong:
21
wchar_t
*
left
=
string
;
22
while
(
left
<
right
)
23
{
24
wchar_t
const
c
= *
left
;
25
*
left
++ = *
right
;
26
*
right
-- =
c
;
27
}
28
29
return
string
;
30
}
__cdecl
#define __cdecl
Definition:
accygwin.h:79
c
const GLubyte * c
Definition:
glext.h:8905
right
GLdouble GLdouble right
Definition:
glext.h:10859
left
GLint left
Definition:
glext.h:7726
c
#define c
Definition:
ke_i.h:80
string
char string[160]
Definition:
util.h:11
_wcsrev
wchar_t *__cdecl _wcsrev(wchar_t *const string)
Definition:
wcsrev.cpp:13
sdk
lib
ucrt
string
wcsrev.cpp
Generated on Thu Dec 4 2025 06:16:23 for ReactOS by
1.9.6