aboutsummaryrefslogtreecommitdiff
path: root/Src/Winamp/strutil.h
blob: a1dbdfac6e24d565870e7cc345b7d087c884a45d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/** (c) Nullsoft, Inc.         C O N F I D E N T I A L
 ** Filename: 
 ** Project:
 ** Description:
 ** Author: Ben Allison benski@nullsoft.com
 ** Created:
 **/

#ifndef NULLSOFT_STRUTILH
#define NULLSOFT_STRUTILH

#ifndef FILENAME_SIZE
#define FILENAME_SIZE (MAX_PATH * 4)
#endif

#ifndef FILETITLE_SIZE
#define FILETITLE_SIZE 400
#endif

#ifdef __cplusplus
extern "C" {
#endif
char *SkipX(char *str, int count);
wchar_t *SkipXW(wchar_t *str, int count);
void CopyChar(char *dest, const char *src);
ptrdiff_t CopyCharW(wchar_t *dest, const wchar_t *src); // returns number of character copied
void MakeRelativePathName(const wchar_t *filename, wchar_t *outFile, const wchar_t *path);
int FileCompareLogicalN(const wchar_t *str1, ptrdiff_t str1size, const wchar_t *str2, ptrdiff_t str2size);
int FileCompareLogical(const wchar_t *str1, const wchar_t *str2);
int CompareStringLogical(const wchar_t * str1, const wchar_t * str2);
char *GetLastCharacter(char *string);
wchar_t *GetLastCharacterW(wchar_t *string);
const char *GetLastCharacterc(const char *string);
const wchar_t *GetLastCharactercW(const wchar_t *string);

wchar_t *scanstr_backW(wchar_t *str, wchar_t *toscan, wchar_t *defval);
const wchar_t *scanstr_backcW(const wchar_t *str, const wchar_t *toscan, const wchar_t *defval);
char *scanstr_back(char *str, char *toscan, char *defval);
char *scanstr_backc(const char *str, char *toscan, char *defval);

char *extension(const char *fn);
wchar_t *extensionW(const wchar_t *fn);
const char *extensionc(const char *fn);
void extension_ex(const char *fn, char *buf, int buflen);
void extension_exW(const wchar_t *fn, wchar_t *buf, int buflen);

#ifdef __cplusplus
}
#endif

#endif