/Users/bernard/b20/bsoft/src/util/Bstring.cpp(3)

NAME
/Users/bernard/b20/bsoft/src/util/Bstring.cpp - Functions in the string class.

SYNOPSIS

#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include 'Bstring.h'
#include 'utilities.h'

  Functions
Bstring operator+ (const char *c, const Bstring &s)
istream & operator>> (istream &input, Bstring &s)
ostream & operator<< (ostream &output, Bstring &s)
Bstring * string_add (Bstring **list, const char *string)
Adds a string to a linked list.
Bstring * string_add (Bstring **list, Bstring &string)
Bstring string_catenate (Bstring *list)
Catenates a string linked list into one string.
int string_kill (Bstring *list)
Kills a string linked list.
Bstring parameter_file_path (Bstring filename)
Finds the parameter file path.
int QsortSmallToLargeString (const void *x, const void *y)
Utility function for sorting string lexically in qsort.
int QsortLargeToSmallString (const void *x, const void *y)
Utility function for sorting string lexically in qsort.
int QsortSmallToLargeStringValue (const void *x, const void *y)
Utility function for sorting string values in qsort.
int QsortLargeToSmallStringValue (const void *x, const void *y)
Utility function for sorting string values in qsort.
int string_sort (Bstring *slist, int descending, int value)
Sorts a list of strings in ascending (descending) lexical or value order.

  Variables
int verbose

Detailed Description

Functions in the string class.

Author:
    Bernard Heymann

Date:
    Created: 20051020

    Modified: 20190603

Definition in file Bstring.cpp.

Function Documentation

  Bstring operator+ (const char * c, const Bstring & s)

Definition at line 681 of file Bstring.cpp.

  ostream& operator<< (ostream & output, Bstring & s)

Definition at line 694 of file Bstring.cpp.

  istream& operator>> (istream & input, Bstring & s)

Definition at line 687 of file Bstring.cpp.

  Bstring parameter_file_path (Bstring 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 787 of file Bstring.cpp.

  int QsortLargeToSmallString (const void * x, const void * y)

Utility function for sorting string lexically in qsort.

Parameters:
    *x first string pointer.
    *y second string pointer.

Returns:
    -1 if x < y and 1 otherwise.

Definition at line 828 of file Bstring.cpp.

  int QsortLargeToSmallStringValue (const void * x, const void * y)

Utility function for sorting string values in qsort.

Parameters:
    *x first string pointer.
    *y second string pointer.

Returns:
    -1 if x < y and 1 otherwise.

Definition at line 856 of file Bstring.cpp.

  int QsortSmallToLargeString (const void * x, const void * y)

Utility function for sorting string lexically in qsort.

Parameters:
    *x first string pointer.
    *y second string pointer.

Returns:
    int -1 if x < y and 1 otherwise.

Definition at line 814 of file Bstring.cpp.

  int QsortSmallToLargeStringValue (const void * x, const void * y)

Utility function for sorting string values in qsort.

Parameters:
    *x first string pointer.
    *y second string pointer.

Returns:
    -1 if x < y and 1 otherwise.

Definition at line 842 of file Bstring.cpp.

  Bstring* string_add (Bstring ** list, const char * string)

Adds a string to a linked list.

Parameters:
    **list the string linked list.
    &string string - unchanged.

Returns:
    Bstring* new string structure.

Definition at line 705 of file Bstring.cpp.

  Bstring* string_add (Bstring ** list, Bstring & string)

Definition at line 711 of file Bstring.cpp.

  Bstring string_catenate (Bstring * list)

Catenates a string linked list into one string.

Parameters:
    *list the string linked list.

Returns:
    Bstring new string.

Definition at line 739 of file Bstring.cpp.

  int string_kill (Bstring * list)

Kills a string linked list.

Parameters:
    *list the string linked list.

Returns:
    int 0.

Definition at line 760 of file Bstring.cpp.

  int string_sort (Bstring * slist, int descending, int value)

Sorts a list of strings in ascending (descending) lexical or value order.

Parameters:
    *slist string list.
    descending flag to do a descending sort.
    value sort in value order.

Returns:
    int 0.

    The string list is first convert to an array, quicksorted, and
    written back into the string list.

Definition at line 875 of file Bstring.cpp.

Variable Documentation

  int verbose

Author

Generated automatically by Doxygen for Bsoft from the source code.