• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 // -*- c++ -*-
19 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
20 
21 //               O S C L _ S T R I N G _ U T I L S
22 
23 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
24 
25 /*! \addtogroup osclutil OSCL Util
26  *
27  * @{
28  */
29 
30 
31 /** \file oscl_string_utils.h
32     \brief Utilities to parse and convert strings
33 */
34 
35 #ifndef OSCL_STRING_UTILS_H_INCLUDED
36 #define OSCL_STRING_UTILS_H_INCLUDED
37 
38 #ifndef OSCL_BASE_H_INCLUDED
39 #include "oscl_base.h"
40 #endif
41 
42 #define oscl_isdigit(c) ((c) >= '0' && (c) <= '9')
43 
44 OSCL_IMPORT_REF const char* skip_whitespace(const char *ptr);
45 
46 OSCL_IMPORT_REF char * skip_whitespace(char * ptr);
47 
48 OSCL_IMPORT_REF const char* skip_whitespace(const char *start, const char *end);
49 
50 OSCL_IMPORT_REF const char* skip_to_whitespace(const char *start, const char *end);
51 
52 OSCL_IMPORT_REF const char * skip_to_line_term(const char *start_ptr, const char *end_ptr);
53 
54 OSCL_IMPORT_REF const char* skip_whitespace_and_line_term(const char *start, const char *end);
55 
56 OSCL_IMPORT_REF int extract_string(const char * in_ptr, char *outstring, int maxsize);
57 
58 OSCL_IMPORT_REF int extract_string(const char * start, const char *end, char *outstring, int maxsize);
59 
60 OSCL_IMPORT_REF bool PV_atoi(const char *buf, const char new_format, uint32& value);
61 
62 OSCL_IMPORT_REF bool PV_atoi(const char *buf, const char new_format, int length, uint32& value);
63 OSCL_IMPORT_REF bool PV_atoi(const char *buf, const char new_format, int length, uint64& value);
64 OSCL_IMPORT_REF bool PV_atof(const char *buf, OsclFloat& value);
65 OSCL_IMPORT_REF bool PV_atof(const char *buf, int length, OsclFloat& value);
66 OSCL_IMPORT_REF int oscl_abs(int aVal);
67 #endif // OSCL_STRING_UTILS_H_INCLUDED
68 
69 /*! @} */
70