update dev300-m57
[ooovba.git] / sal / qa / rtl_strings / rtl_String_Utils.hxx
blobd1011b75e0d94095fde0c7d150de7d2caee4d78b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: rtl_String_Utils.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 #*************************************************************************/
31 //------------------------------------------------------------------------
32 //------------------------------------------------------------------------
34 #ifndef _RTL_STRING_UTILS_HXX_
35 #define _RTL_STRING_UTILS_HXX_
37 #ifdef __cplusplus
39 //------------------------------------------------------------------------
40 //------------------------------------------------------------------------
42 #include <math.h>
43 #include <stdlib.h>
45 //------------------------------------------------------------------------
46 //------------------------------------------------------------------------
48 #ifndef _SAL_TYPES_H_
49 #include <sal/types.h>
50 #endif
52 #ifndef _RTL_USTRING_H_
53 #include <rtl/ustring.h>
54 #endif
56 #ifndef _RTL_STRING_HXX_
57 #include <rtl/string.hxx>
58 #endif
60 //------------------------------------------------------------------------
61 //------------------------------------------------------------------------
62 sal_Char* cpystr( sal_Char* dst, const sal_Char* src );
63 sal_Char* cpynstr( sal_Char* dst, const sal_Char* src, sal_uInt32 cnt );
65 sal_Bool cmpstr( const sal_Char* str1, const sal_Char* str2, sal_uInt32 len );
66 sal_Bool cmpustr( const sal_Unicode* str1, const sal_Unicode* str2, sal_uInt32 len );
67 sal_Bool cmpustr( const sal_Unicode* str1, const sal_Unicode* str2 );
69 sal_Char* createName( sal_Char* dst, const sal_Char* src, sal_uInt32 cnt );
70 void makeComment(char *com, const char *str1, const char *str2, sal_Int32 sgn);
73 sal_uInt32 AStringLen( const sal_Char *pAStr );
75 sal_uInt32 UStringLen( const sal_Unicode *pUStr );
77 //------------------------------------------------------------------------
79 sal_Bool AStringToFloatCompare ( const sal_Char *pStr,
80 const float nX,
81 const float nEPS
84 sal_Bool AStringToDoubleCompare ( const sal_Char *pStr,
85 const double nX,
86 const double nEPS
89 //------------------------------------------------------------------------
91 sal_Bool AStringIsValid( const sal_Char *pAStr );
93 sal_Bool AStringNIsValid( const sal_Char *pAStr,
94 const sal_uInt32 nStrLen
97 //------------------------------------------------------------------------
99 sal_Int32 AStringToUStringCompare( const sal_Unicode *pUStr,
100 const sal_Char *pAStr
103 sal_Int32 AStringToUStringNCompare( const sal_Unicode *pUStr,
104 const sal_Char *pAStr,
105 const sal_uInt32 nAStrCount
108 sal_Int32 AStringToRTLUStringCompare( const rtl_uString *pRTLUStr,
109 const sal_Char *pAStr
112 sal_Int32 AStringToRTLUStringNCompare( const rtl_uString *pRTLUStr,
113 const sal_Char *pAStr,
114 const sal_uInt32 nAStrCount
117 //------------------------------------------------------------------------
119 sal_Bool AStringToUStringCopy( sal_Unicode *pDest,
120 const sal_Char *pSrc
123 sal_Bool AStringToUStringNCopy( sal_Unicode *pDest,
124 const sal_Char *pSrc,
125 const sal_uInt32 nSrcLen
128 //------------------------------------------------------------------------
129 //------------------------------------------------------------------------
131 #endif /* __cplusplus */
133 #endif /* _RTL_STRING_UTILS_HXX */