1*565d668cSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*565d668cSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*565d668cSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*565d668cSAndrew Rist  * distributed with this work for additional information
6*565d668cSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*565d668cSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*565d668cSAndrew Rist  * "License"); you may not use this file except in compliance
9*565d668cSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*565d668cSAndrew Rist  *
11*565d668cSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*565d668cSAndrew Rist  *
13*565d668cSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*565d668cSAndrew Rist  * software distributed under the License is distributed on an
15*565d668cSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*565d668cSAndrew Rist  * KIND, either express or implied.  See the License for the
17*565d668cSAndrew Rist  * specific language governing permissions and limitations
18*565d668cSAndrew Rist  * under the License.
19*565d668cSAndrew Rist  *
20*565d668cSAndrew Rist  *************************************************************/
21*565d668cSAndrew Rist 
22*565d668cSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir //------------------------------------------------------------------------
25cdf0e10cSrcweir //------------------------------------------------------------------------
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #ifndef _RTL_STRING_UTILS_HXX_
28cdf0e10cSrcweir #define _RTL_STRING_UTILS_HXX_
29cdf0e10cSrcweir 
30cdf0e10cSrcweir #ifdef __cplusplus
31cdf0e10cSrcweir 
32cdf0e10cSrcweir //------------------------------------------------------------------------
33cdf0e10cSrcweir //------------------------------------------------------------------------
34cdf0e10cSrcweir 
35cdf0e10cSrcweir #include <math.h>
36cdf0e10cSrcweir #include <stdlib.h>
37cdf0e10cSrcweir 
38cdf0e10cSrcweir //------------------------------------------------------------------------
39cdf0e10cSrcweir //------------------------------------------------------------------------
40cdf0e10cSrcweir 
41cdf0e10cSrcweir #ifndef _SAL_TYPES_H_
42cdf0e10cSrcweir 	#include <sal/types.h>
43cdf0e10cSrcweir #endif
44cdf0e10cSrcweir 
45cdf0e10cSrcweir #ifndef _RTL_USTRING_H_
46cdf0e10cSrcweir 	#include <rtl/ustring.h>
47cdf0e10cSrcweir #endif
48cdf0e10cSrcweir 
49cdf0e10cSrcweir #ifndef _RTL_STRING_HXX_
50cdf0e10cSrcweir 	#include <rtl/string.hxx>
51cdf0e10cSrcweir #endif
52cdf0e10cSrcweir 
53cdf0e10cSrcweir //------------------------------------------------------------------------
54cdf0e10cSrcweir //------------------------------------------------------------------------
55cdf0e10cSrcweir sal_Char* cpystr( sal_Char* dst, const sal_Char* src );
56cdf0e10cSrcweir sal_Char* cpynstr( sal_Char* dst, const sal_Char* src, sal_uInt32 cnt );
57cdf0e10cSrcweir 
58cdf0e10cSrcweir sal_Bool cmpstr( const sal_Char* str1, const sal_Char* str2, sal_uInt32 len );
59cdf0e10cSrcweir sal_Bool cmpustr( const sal_Unicode* str1, const sal_Unicode* str2, sal_uInt32 len );
60cdf0e10cSrcweir sal_Bool cmpustr( const sal_Unicode* str1, const sal_Unicode* str2 );
61cdf0e10cSrcweir 
62cdf0e10cSrcweir sal_Char* createName( sal_Char* dst, const sal_Char* src, sal_uInt32 cnt );
63cdf0e10cSrcweir void makeComment(char *com, const char *str1, const char *str2, sal_Int32 sgn);
64cdf0e10cSrcweir 
65cdf0e10cSrcweir 
66cdf0e10cSrcweir sal_uInt32 AStringLen( const sal_Char *pAStr );
67cdf0e10cSrcweir 
68cdf0e10cSrcweir sal_uInt32 UStringLen( const sal_Unicode *pUStr );
69cdf0e10cSrcweir 
70cdf0e10cSrcweir //------------------------------------------------------------------------
71cdf0e10cSrcweir 
72cdf0e10cSrcweir sal_Bool AStringToFloatCompare ( const sal_Char  *pStr,
73cdf0e10cSrcweir                                  const float      nX,
74cdf0e10cSrcweir                                  const float      nEPS
75cdf0e10cSrcweir                                 );
76cdf0e10cSrcweir 
77cdf0e10cSrcweir sal_Bool AStringToDoubleCompare ( const sal_Char  *pStr,
78cdf0e10cSrcweir                                   const double     nX,
79cdf0e10cSrcweir                                   const double     nEPS
80cdf0e10cSrcweir                                 );
81cdf0e10cSrcweir 
82cdf0e10cSrcweir //------------------------------------------------------------------------
83cdf0e10cSrcweir 
84cdf0e10cSrcweir sal_Bool AStringIsValid( const sal_Char  *pAStr );
85cdf0e10cSrcweir 
86cdf0e10cSrcweir sal_Bool AStringNIsValid( const sal_Char   *pAStr,
87cdf0e10cSrcweir                           const sal_uInt32  nStrLen
88cdf0e10cSrcweir                         );
89cdf0e10cSrcweir 
90cdf0e10cSrcweir //------------------------------------------------------------------------
91cdf0e10cSrcweir 
92cdf0e10cSrcweir sal_Int32 AStringToUStringCompare( const sal_Unicode *pUStr,
93cdf0e10cSrcweir                                    const sal_Char    *pAStr
94cdf0e10cSrcweir                                  );
95cdf0e10cSrcweir 
96cdf0e10cSrcweir sal_Int32 AStringToUStringNCompare( const sal_Unicode  *pUStr,
97cdf0e10cSrcweir                                     const sal_Char     *pAStr,
98cdf0e10cSrcweir                                     const sal_uInt32    nAStrCount
99cdf0e10cSrcweir                                    );
100cdf0e10cSrcweir 
101cdf0e10cSrcweir sal_Int32 AStringToRTLUStringCompare( const rtl_uString  *pRTLUStr,
102cdf0e10cSrcweir                                       const sal_Char     *pAStr
103cdf0e10cSrcweir                                     );
104cdf0e10cSrcweir 
105cdf0e10cSrcweir sal_Int32 AStringToRTLUStringNCompare( const rtl_uString  *pRTLUStr,
106cdf0e10cSrcweir                                        const sal_Char     *pAStr,
107cdf0e10cSrcweir                                        const sal_uInt32    nAStrCount
108cdf0e10cSrcweir                                      );
109cdf0e10cSrcweir 
110cdf0e10cSrcweir //------------------------------------------------------------------------
111cdf0e10cSrcweir 
112cdf0e10cSrcweir sal_Bool AStringToUStringCopy( sal_Unicode     *pDest,
113cdf0e10cSrcweir                                const sal_Char  *pSrc
114cdf0e10cSrcweir                              );
115cdf0e10cSrcweir 
116cdf0e10cSrcweir sal_Bool AStringToUStringNCopy( sal_Unicode       *pDest,
117cdf0e10cSrcweir                                 const sal_Char    *pSrc,
118cdf0e10cSrcweir                                 const sal_uInt32   nSrcLen
119cdf0e10cSrcweir                               );
120cdf0e10cSrcweir 
121cdf0e10cSrcweir //------------------------------------------------------------------------
122cdf0e10cSrcweir //------------------------------------------------------------------------
123cdf0e10cSrcweir 
124cdf0e10cSrcweir #endif /* __cplusplus */
125cdf0e10cSrcweir 
126cdf0e10cSrcweir #endif /* _RTL_STRING_UTILS_HXX */
127cdf0e10cSrcweir 
128cdf0e10cSrcweir 
129cdf0e10cSrcweir 
130cdf0e10cSrcweir 
131cdf0e10cSrcweir 
132cdf0e10cSrcweir 
133cdf0e10cSrcweir 
134