1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef CPV_STR_H 25 #define CPV_STR_H 26 27 28 #ifdef UNX 29 #define stricmp(str1,str2) strcasecmp(str1, str2) 30 #define strnicmp(str1,str2,n) strncasecmp(str1, str2, n) 31 #endif 32 33 34 typedef struct Cstring 35 { 36 char * dpText; 37 intt nLength; 38 39 } Cstring; 40 41 #define Cstring_THIS Cstring * pThis 42 43 44 void Cstring_CTOR( Cstring_THIS, 45 char * pText ); 46 void Cstring_DTOR( Cstring * pThis ); 47 48 void Cs_Assign( Cstring_THIS, 49 char * i_pNewText ); 50 void Cs_AssignPart( Cstring_THIS, 51 char * i_pNewText, 52 intt i_nLength ); 53 54 void Cs_AddCs( Cstring_THIS, 55 Cstring * i_pAddedText ); 56 void Cs_Add( Cstring_THIS, 57 char * i_pAddedText ); 58 59 char * Cs_Str( Cstring_THIS ); 60 intt Cs_Length( Cstring_THIS ); 61 62 void Cs_ToUpper( Cstring_THIS ); 63 64 65 66 #endif 67 68