| Bsoft 2.0.5 Bernard's software package

Macros | Functions
string_util.h File Reference
`#include <vector>`
`#include <sstream>`
`#include <iterator>`
`#include <algorithm>`
`#include <chrono>`
`#include <complex>`

Go to the source code of this file.

## Macros
#define | _STRINGUTIL_

## Functions
string | command_line (int argc, char **argv)
string | base (string &filename)
string | extension (string filename)
string | replace_extension (string &filename, string ext)
string | insert (string &filename, string ins)
string | parameter_file_path (string &filename)
| Finds the parameter file path. More...
vector< string > | split (const string &s)
| Splits a string on whitespace. More...
vector< string > | split (const string &s, char delim)
| Splits a string using a given delimiter. More...
vector< long > | parse_integer_vector (string vecstr)
vector< double > | parse_real_vector (string vecstr)
string | local_time ()
template<typename T >
bool | isfinite (complex< T > &value)

## Detailed Description

Author
  Bernard Heymann

Date
  20160911 - 20180330

Definition in file string_util.h.

## Macro Definition Documentation

## ◆ _STRINGUTIL_

#define _STRINGUTIL_

Definition at line 52 of file string_util.h.

## Function Documentation

## ◆ base()

string base | ( | string & | filename | ) |

Definition at line 28 of file string_util.cpp.

## ◆ command_line()

string command_line | ( | int | argc,
|  | char ** | argv
| ) |  |

Definition at line 16 of file string_util.cpp.

## ◆ extension()

string extension | ( | string | filename | ) |

Definition at line 32 of file string_util.cpp.

## ◆ insert()

string insert | ( | string & | filename,
|  | string | ins
| ) |  |

Definition at line 48 of file string_util.cpp.

## ◆ isfinite()

template<typename T >

bool isfinite | ( | complex< T > & | value | ) |

## ◆ local_time()

string local_time | ( |  | ) |

Definition at line 143 of file string_util.cpp.

## ◆ parameter_file_path()

string parameter_file_path | ( | string & | filename | ) |

Finds the parameter file path.

Parameters

  &filename | the parameter filename.

Returns
  Bstring the full path and file name.

      The parameter file path should primarily be defined in the environmental
      variable "BPARAM".
      Otherwise a default is used which may or may not be valid.
      The string returned has a length containing the path plus one byte.

Definition at line 69 of file string_util.cpp.

## ◆ parse_integer_vector()

vector<long> parse_integer_vector | ( | string | vecstr | ) |

Definition at line 119 of file string_util.cpp.

## ◆ parse_real_vector()

vector<double> parse_real_vector | ( | string | vecstr | ) |

Definition at line 131 of file string_util.cpp.

## ◆ replace_extension()

string replace_extension | ( | string & | filename,
|  | string | ext
| ) |  |

Definition at line 41 of file string_util.cpp.

## ◆ split() [1/2]

vector<string> split | ( | const string & | s | ) |

Splits a string on whitespace.

Parameters

  &s | string to be split.

Returns
  vector<string> vector of strings.

Definition at line 92 of file string_util.cpp.

## ◆ split() [2/2]

vector<string> split | ( | const string & | s,
|  | char | delim
| ) |  |

Splits a string using a given delimiter.

Parameters

  &s | string to be split.
  delim | delimiter.

Returns
  vector<string> vector of strings.

Definition at line 106 of file string_util.cpp.