cbp2make
Makefile generation tool for Code::Blocks IDE
Functions
cbhelper.cpp File Reference

Auxiliary functions for strings processing. More...

#include <iostream>
#include "cbhelper.h"

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...
 

Detailed Description

Auxiliary functions for strings processing.

Function Documentation

◆ FlatFileName()

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()

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()

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()

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).