cbp2make
Makefile generation tool for Code::Blocks IDE
Functions | Variables
cbhelper.h File Reference

Auxiliary functions for strings processing. More...

#include "stlstrings.h"

Go to the source code of this file.

Functions

void ShowStringList (const CString &Title, const CString &LinePrefix, const CStringList &StringList)
 Prints titled string list to standard output. More...
 
CString MakefileFriendly (const CString &AString)
 Makes a makefile compatible identifier string from the given string. More...
 
CString XMLFriendly (const CString &AString)
 Makes an XML compatible identifier string from the given string. More...
 
CString FlatFileName (const CString &FileName)
 Converts given file path to another file name without path delimiters. More...
 

Variables

static const int CASE_KEEP = 0
 
static const int CASE_LOWER = 1
 
static const int CASE_UPPER = 2
 
static const int QUOTE_AUTO = 0
 
static const int QUOTE_NEVER = 1
 
static const int QUOTE_ALWAYS = 2
 

Detailed Description

Auxiliary functions for strings processing.

Function Documentation

◆ FlatFileName()

CString FlatFileName ( const CString FileName)

Converts given file path to another file name without path delimiters.

Parameters
FileNamea file name possibly containing path to a file.

Example: "path/to/file/source.o" will be converted to "path_to_file_source.o"

◆ MakefileFriendly()

CString MakefileFriendly ( const CString AString)

Makes a makefile compatible identifier string from the given string.

Parameters
AStringan identifier name.

Custom strings may contain characters that are not allowed inside makefile, therefore these characters are replaced with allowed characters (underscore, etc).

◆ ShowStringList()

void ShowStringList ( const CString Title,
const CString LinePrefix,
const CStringList StringList 
)

Prints titled string list to standard output.

Parameters
Titletitle of the string list.
LinePrefixprefix string pritned at the beginning of each line.
StringListlist of strings to display.

◆ XMLFriendly()

CString XMLFriendly ( const CString AString)

Makes an XML compatible identifier string from the given string.

Parameters
AStringan identifier name.

Custom strings may contain characters that are not allowed for XML tags, therefore these characters are replaced with allowed characters (underscore, etc).

Variable Documentation

◆ CASE_KEEP

const int CASE_KEEP = 0
static

◆ CASE_LOWER

const int CASE_LOWER = 1
static

◆ CASE_UPPER

const int CASE_UPPER = 2
static

◆ QUOTE_ALWAYS

const int QUOTE_ALWAYS = 2
static

◆ QUOTE_AUTO

const int QUOTE_AUTO = 0
static

◆ QUOTE_NEVER

const int QUOTE_NEVER = 1
static