xref: /trunk/main/xml2cmp/source/inc/str.h (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef CPV_STR_H
29 #define CPV_STR_H
30 
31 
32 #ifdef UNX
33 #define stricmp(str1,str2)      strcasecmp(str1, str2)
34 #define strnicmp(str1,str2,n)   strncasecmp(str1, str2, n)
35 #endif
36 
37 
38 typedef struct Cstring
39 {
40     char *              dpText;
41     intt                nLength;
42 
43 } Cstring;
44 
45 #define Cstring_THIS        Cstring * pThis
46 
47 
48 void                Cstring_CTOR( Cstring_THIS,
49                         char *              pText );
50 void                Cstring_DTOR( Cstring * pThis );
51 
52 void                Cs_Assign( Cstring_THIS,
53                         char *              i_pNewText );
54 void                Cs_AssignPart( Cstring_THIS,
55                         char *              i_pNewText,
56                         intt                i_nLength );
57 
58 void                Cs_AddCs( Cstring_THIS,
59                         Cstring *           i_pAddedText );
60 void                Cs_Add( Cstring_THIS,
61                         char *              i_pAddedText );
62 
63 char *              Cs_Str( Cstring_THIS );
64 intt                Cs_Length( Cstring_THIS );
65 
66 void                Cs_ToUpper( Cstring_THIS );
67 
68 
69 
70 #endif
71 
72