mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 21:05:43 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
63
base/applications/msconfig_new/stringutils.h
Normal file
63
base/applications/msconfig_new/stringutils.h
Normal file
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Applications
|
||||
* LICENSE: LGPL - See COPYING in the top level directory
|
||||
* FILE: base/applications/msconfig_new/stringutils.h
|
||||
* PURPOSE: ANSI & UNICODE String Utility Functions
|
||||
* COPYRIGHT: Copyright 2011-2012 Hermes BELUSCA - MAITO <hermes.belusca@sfr.fr>
|
||||
*/
|
||||
|
||||
#ifndef __STRINGUTILS_H__
|
||||
#define __STRINGUTILS_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
//
|
||||
// String formatting
|
||||
//
|
||||
LPTSTR FormatStringV(LPCTSTR str, va_list args);
|
||||
LPTSTR FormatString(LPCTSTR str, ...);
|
||||
|
||||
//
|
||||
// String handling (ANSI <-> Unicode UTF16)
|
||||
//
|
||||
LPSTR UnicodeToAnsi(LPCWSTR strW);
|
||||
LPWSTR AnsiToUnicode(LPCSTR strA);
|
||||
LPSTR DuplicateStringA(LPCSTR str);
|
||||
LPWSTR DuplicateStringW(LPCWSTR str);
|
||||
LPSTR DuplicateStringAEx(LPCSTR str, size_t numOfChars);
|
||||
LPWSTR DuplicateStringWEx(LPCWSTR str, size_t numOfChars);
|
||||
|
||||
//
|
||||
// Conversion macros ANSI <-> Unicode
|
||||
//
|
||||
#ifdef UNICODE
|
||||
#define NewAnsiString(x) UnicodeToAnsi(x)
|
||||
#define NewPortableString(x) AnsiToUnicode(x)
|
||||
#define DuplicateString(x) DuplicateStringW(x)
|
||||
#define DuplicateStringEx(x, y) DuplicateStringWEx((x), (y))
|
||||
#else
|
||||
#define NewAnsiString(x) DuplicateStringA(x)
|
||||
#define NewPortableString(x) DuplicateString(x)
|
||||
#define DuplicateString(x) DuplicateStringA(x)
|
||||
#define DuplicateStringEx(x, y) DuplicateStringAEx((x), (y))
|
||||
#endif
|
||||
|
||||
//
|
||||
// String search functions
|
||||
//
|
||||
#define FindSubStr(str, strSearch) _tcsstr((str), (strSearch))
|
||||
LPTSTR FindSubStrI(LPCTSTR str, LPCTSTR strSearch);
|
||||
|
||||
LPTSTR AppendPathSeparator(LPTSTR lpszPath);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // __STRINGUTILS_H__
|
||||
|
||||
/* EOF */
|
Loading…
Add table
Add a link
Reference in a new issue