![]() |
Object-oriented Scientific Computing Library: Version 0.910
|
There are a couple classes and functions to help manipulate strings of text. Conversion routines for std::string
objects are given in string_conv.h and include
See also size_of_exponent() and double_to_ieee_string().
The columnify class converts a set of strings into nicely formatted columns by padding with the necessary amount of spaces. This class operates on string objects of type std::string
, and also works will for formatting columns of floating-point numbers. This class is used to provide output for matrices in the functions matrix_out(), matrix_out_paren(), and matrix_cx_out_paren(). For output of vectors, see vector_out() in array.h.
The format_float class will reformat double precision numbers into a form appropriate for HTML or LaTeX documents.
A related function, screenify(), reformats a column of strings into many columns stored row-by-row in a new string array. It operates very similar to the way the classic Unix command ls
organizes files and directories in multiple columns in order to save screen space.
The function count_words() counts the number of "words" in a string, which are delimited by whitespace.
Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).