update dev300-m58
[ooovba.git] / sal / qa / OStringBuffer / rtl_String_Utils.hxx
blob8d4c07fc7ea988b5fb0c16eca1a4b4622fedeee9
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.5 $
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 cmpstr( const sal_Char* str1, const sal_Char* str2 );
67 sal_Bool cmpustr( const sal_Unicode* str1, const sal_Unicode* str2, sal_uInt32 len );
68 sal_Bool cmpustr( const sal_Unicode* str1, const sal_Unicode* str2 );
70 sal_Char* createName( sal_Char* dst, const sal_Char* src, sal_uInt32 cnt );
71 void makeComment(char *com, const char *str1, const char *str2, sal_Int32 sgn);
74 sal_uInt32 AStringLen( const sal_Char *pAStr );
76 sal_uInt32 UStringLen( const sal_Unicode *pUStr );
78 //------------------------------------------------------------------------
80 sal_Bool AStringToFloatCompare ( const sal_Char *pStr,
81 const float nX,
82 const float nEPS
85 sal_Bool AStringToDoubleCompare ( const sal_Char *pStr,
86 const double nX,
87 const double nEPS
90 //------------------------------------------------------------------------
92 sal_Bool AStringIsValid( const sal_Char *pAStr );
94 sal_Bool AStringNIsValid( const sal_Char *pAStr,
95 const sal_uInt32 nStrLen
98 //------------------------------------------------------------------------
100 sal_Int32 AStringToUStringCompare( const sal_Unicode *pUStr,
101 const sal_Char *pAStr
104 sal_Int32 AStringToUStringNCompare( const sal_Unicode *pUStr,
105 const sal_Char *pAStr,
106 const sal_uInt32 nAStrCount
109 sal_Int32 AStringToRTLUStringCompare( const rtl_uString *pRTLUStr,
110 const sal_Char *pAStr
113 sal_Int32 AStringToRTLUStringNCompare( const rtl_uString *pRTLUStr,
114 const sal_Char *pAStr,
115 const sal_uInt32 nAStrCount
118 //------------------------------------------------------------------------
120 sal_Bool AStringToUStringCopy( sal_Unicode *pDest,
121 const sal_Char *pSrc
124 sal_Bool AStringToUStringNCopy( sal_Unicode *pDest,
125 const sal_Char *pSrc,
126 const sal_uInt32 nSrcLen
129 //------------------------------------------------------------------------
130 //------------------------------------------------------------------------
132 #endif /* __cplusplus */
134 #endif /* _RTL_STRING_UTILS_HXX */