plastimatch
Loading...
Searching...
No Matches
Functions
string_util.cxx File Reference
#include "plmsys_config.h"
#include <algorithm>
#include <ctype.h>
#include <fstream>
#include <iostream>
#include <sstream>
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <iterator>
#include "plm_va_copy.h"
#include "string_util.h"

Functions

bool string_starts_with (const std::string &s1, const char *s2)
 
bool string_starts_with (const char *s1, const char *s2)
 
int plm_strcmp (const char *s1, const char *s2)
 
std::string make_lowercase (const std::string &s)
 
std::string make_uppercase (const std::string &s)
 
static int regularize_string_callback (int c)
 
std::string regularize_string (const std::string &s)
 
void string_util_rtrim_whitespace (char *s)
 
Plm_return_code parse_int13 (int *arr, const char *string)
 
Plm_return_code parse_int13 (int *arr, const std::string &string)
 
Plm_return_code parse_float13 (float *arr, const char *string)
 
Plm_return_code parse_float13 (float *arr, const std::string &string)
 
Plm_return_code parse_dicom_float2 (float *arr, const char *string)
 
Plm_return_code parse_dicom_float3 (float *arr, const char *string)
 
Plm_return_code parse_dicom_float6 (float *arr, const char *string)
 
std::vector< floatparse_dicom_float_vec (const char *string)
 
std::vector< intparse_int3_string (const char *s)
 
std::vector< floatparse_float3_string (const char *s)
 
std::vector< floatparse_float3_string (const std::string &s)
 
std::vector< floatparse_float_string (const char *s)
 
std::vector< floatparse_float_string (const std::string &s)
 
const std::string string_trim (const std::string &str, const std::string &whitespace)
 
std::string slurp_file (const char *fn)
 
std::string slurp_file (const std::string &fn)
 
std::string string_format_va (const char *fmt, va_list ap)
 
std::string string_format (const char *fmt,...)
 
size_t ci_find (const std::string &str1, const std::string &str2)
 
bool string_value_true (const char *s)
 
bool string_value_true (const std::string &s)
 
bool string_value_false (const char *s)
 
bool string_value_false (const std::string &s)
 
template<typename T >
std::string PLM_to_string (T value)
 
template<typename T >
std::string PLM_to_string (T *value, int n)
 
std::vector< std::string > & string_split (const std::string &s, char delim, std::vector< std::string > &elems)
 
std::vector< std::string > string_split (const std::string &s, char delim)
 
bool split_key_val (const std::string &s, std::string &key, std::string &val, char delim)
 
bool split_array_index (const std::string &s, std::string &array, std::string &index)
 
template std::string PLM_to_string (int value)
 
template std::string PLM_to_string (size_t value)
 
template std::string PLM_to_string (float value)
 
template std::string PLM_to_string (double value)
 
template std::string PLM_to_string (int *value, int n)
 
template std::string PLM_to_string (double *value, int n)
 

Function Documentation

◆ ci_find()

size_t ci_find ( const std::string &  str1,
const std::string &  str2 
)

◆ make_lowercase()

std::string make_lowercase ( const std::string &  s)

◆ make_uppercase()

std::string make_uppercase ( const std::string &  s)

◆ parse_dicom_float2()

Plm_return_code parse_dicom_float2 ( float arr,
const char string 
)

◆ parse_dicom_float3()

Plm_return_code parse_dicom_float3 ( float arr,
const char string 
)

◆ parse_dicom_float6()

Plm_return_code parse_dicom_float6 ( float arr,
const char string 
)

◆ parse_dicom_float_vec()

std::vector< float > parse_dicom_float_vec ( const char string)

◆ parse_float13() [1/2]

Plm_return_code parse_float13 ( float arr,
const char string 
)

◆ parse_float13() [2/2]

Plm_return_code parse_float13 ( float arr,
const std::string &  string 
)

◆ parse_float3_string() [1/2]

std::vector< float > parse_float3_string ( const char s)

◆ parse_float3_string() [2/2]

std::vector< float > parse_float3_string ( const std::string &  s)

◆ parse_float_string() [1/2]

std::vector< float > parse_float_string ( const char s)

◆ parse_float_string() [2/2]

std::vector< float > parse_float_string ( const std::string &  s)

◆ parse_int13() [1/2]

Plm_return_code parse_int13 ( int arr,
const char string 
)

◆ parse_int13() [2/2]

Plm_return_code parse_int13 ( int arr,
const std::string &  string 
)

◆ parse_int3_string()

std::vector< int > parse_int3_string ( const char s)

◆ plm_strcmp()

int plm_strcmp ( const char s1,
const char s2 
)

◆ PLM_to_string() [1/8]

template std::string PLM_to_string ( double value,
int  n 
)

◆ PLM_to_string() [2/8]

template std::string PLM_to_string ( double  value)

◆ PLM_to_string() [3/8]

template std::string PLM_to_string ( float  value)

◆ PLM_to_string() [4/8]

template std::string PLM_to_string ( int value,
int  n 
)

◆ PLM_to_string() [5/8]

template std::string PLM_to_string ( int  value)

◆ PLM_to_string() [6/8]

template std::string PLM_to_string ( size_t  value)

◆ PLM_to_string() [7/8]

template<typename T >
std::string PLM_to_string ( T value,
int  n 
)

◆ PLM_to_string() [8/8]

template<typename T >
std::string PLM_to_string ( T  value)

◆ regularize_string()

std::string regularize_string ( const std::string &  s)

◆ regularize_string_callback()

static int regularize_string_callback ( int  c)
static

◆ slurp_file() [1/2]

std::string slurp_file ( const char fn)

◆ slurp_file() [2/2]

std::string slurp_file ( const std::string &  fn)

◆ split_array_index()

bool split_array_index ( const std::string &  s,
std::string &  array,
std::string &  index 
)

◆ split_key_val()

bool split_key_val ( const std::string &  s,
std::string &  key,
std::string &  val,
char  delim 
)

◆ string_format()

std::string string_format ( const char fmt,
  ... 
)

◆ string_format_va()

std::string string_format_va ( const char fmt,
va_list  ap 
)

◆ string_split() [1/2]

std::vector< std::string > string_split ( const std::string &  s,
char  delim 
)

◆ string_split() [2/2]

std::vector< std::string > & string_split ( const std::string &  s,
char  delim,
std::vector< std::string > &  elems 
)

◆ string_starts_with() [1/2]

bool string_starts_with ( const char s1,
const char s2 
)

◆ string_starts_with() [2/2]

bool string_starts_with ( const std::string &  s1,
const char s2 
)

◆ string_trim()

const std::string string_trim ( const std::string &  str,
const std::string &  whitespace 
)

◆ string_util_rtrim_whitespace()

void string_util_rtrim_whitespace ( char s)

◆ string_value_false() [1/2]

bool string_value_false ( const char s)

◆ string_value_false() [2/2]

bool string_value_false ( const std::string &  s)

◆ string_value_true() [1/2]

bool string_value_true ( const char s)

◆ string_value_true() [2/2]

bool string_value_true ( const std::string &  s)