File: strlib.h

package info (click to toggle)
gr-framework 0.73.14%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 11,600 kB
  • sloc: ansic: 87,413; cpp: 45,348; objc: 3,057; javascript: 2,647; makefile: 1,129; python: 1,000; sh: 991; yacc: 855; pascal: 554; fortran: 228
file content (35 lines) | stat: -rw-r--r-- 843 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef _STRLIB_H_
#define _STRLIB_H_

#ifdef __cplusplus
extern "C" {
#endif

/*
 * SCIENTIFIC_FORMAT_OPTION_E: 1.2E5
 * SCIENTIFIC_FORMAT_OPTION_TEXTEX: 1.2x10^{5} (x replaced with unicode-sign)
 * SCIENTIFIC_FORMAT_OPTION_MATHTEX: 1.2\times10^{5}
 */

#define SCIENTIFIC_FORMAT_OPTION_E 1
#define SCIENTIFIC_FORMAT_OPTION_TEXTEX 2
#define SCIENTIFIC_FORMAT_OPTION_MATHTEX 3

typedef struct
{
  int scientific;
  int decimal_digits;
} str_format_reference_t;

str_format_reference_t *str_get_format_reference(str_format_reference_t *, double, double, double, double, int);
char *str_remove(char *, char);
char *str_pad(char *, char, int);
char *str_ftoa(char *, double, str_format_reference_t *, int);
int str_casecmp(char *, char *);
int str_utf8_to_unicode(const unsigned char *utf8_str, int *length);

#ifdef __cplusplus
}
#endif

#endif