libarmutils  1.4
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups
string_utils.h
Go to the documentation of this file.
1 /*******************************************************************************
2 *
3 * COPYRIGHT (C) 2010 Battelle Memorial Institute. All Rights Reserved.
4 *
5 ********************************************************************************
6 *
7 * Author:
8 * name: Brian Ermold
9 * phone: (509) 375-2277
10 * email: brian.ermold@pnl.gov
11 *
12 ********************************************************************************
13 *
14 * REPOSITORY INFORMATION:
15 * $Revision: 15861 $
16 * $Author: ermold $
17 * $Date: 2012-11-12 01:15:27 +0000 (Mon, 12 Nov 2012) $
18 *
19 ********************************************************************************
20 *
21 * NOTE: DOXYGEN is used to generate documentation for this file.
22 *
23 *******************************************************************************/
24 
25 /** @file string_utils.h
26  * String Utilities
27  */
28 
29 #ifndef _STRING_UTILS_H
30 #define _STRING_UTILS_H
31 
32 /**
33  * @defgroup ARMUTILS_STRING_UTILS String Utils
34  */
35 /*@{*/
36 
38  const char *string,
39  int *major,
40  int *minor,
41  int *micro);
42 
43 int qsort_numeric_strcmp(const void *str1, const void *str2);
44 int qsort_strcmp(const void *str1, const void *str2);
45 
46 char *string_copy(const char *string);
47 
48 char *string_create(const char *format, ...);
49 char *string_create_va_list(const char *format, va_list args);
50 
51 int string_to_doubles(char *line, int buflen, double *buffer);
52 int string_to_floats(char *line, int buflen, float *buffer);
53 int string_to_ints(char *line, int buflen, int *buffer);
54 int string_to_longs(char *line, int buflen, long *buffer);
55 
56 char *trim_repository_string(const char *string, int buflen, char *buffer);
57 
58 char *trim_trailing_spaces(char *string);
59 
60 /*@}*/
61 
62 #endif /* _STRING_UTILS_H */