Skip to content

Rose::StringUtility

Functions for operating on strings.

Types

Name

Description

FileNameClassification

NumberParseResult

StringWithLineNumber

String with source location information.

FileNameLibrary

FileWithLineNumbers

A vector of strings with line numbers and file names.

Enums

Name

Description

FileNameLocation

Find file names non‐recursively.

OSType

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Functions

Name

Description

addrIntervalToString

Convert an interval of virtual addresses to a string.

addrToString

Convert a virtual address to a string.

bourneEscape

Escapes characters that are special to the Bourne shell.

cEscape

Escapes characters that are special to C/C++.

cUnescape

Unescapes C++ string literals.

centerJustify

Center a string in a field.

classifyFileName

Determine whether a file is source code or system library.

convertToLowerCase

Convert to lower case.

copyEdit

Replace all occurrences of a string with another string.

csvEscape

Escapes characters that are special in CSV tables.

decode_base64

Convert base‐64 to binary.

directoryDistance

Edit distance between two directory names.

encode_base64

Convert binary data to base‐64.

escapeNewLineCharaters

Escapes line feeds and double quotes.

escapeNewlineAndDoubleQuoteCharacters

fileNameSuffix

Get the file name suffix (extension) without the leading dot.

fixLineTermination

Normalizes line termination.

generate_checksum

Compute a checkshum.

getAbsolutePathFromRelativePath

Get the absolute path from the relative path.

getOSType

Obtain operating system type information.

getPathFromFileName

Returns all but the last component of a path in a filesystem.

hexadecimalToInt

Convert an ASCII hexadecimal character to an integer.

homeDir

Name of the home directory.

htmlEscape

Escapes HTML special characters.

intToHex

Convert an integer to a hexadecimal string.

isContainedIn

Determines whether one string contains another.

isLineTerminated

Returns true if the string ends with line termination.

join

joinEnglish

Join strings as if they were English prose.

join_range

Join individual items to form a single string.

jsonEscape

Escapes characters that are special inside a JSON string.

leftJustify

Left justify a string to specified width.

listToString

listToString overloads

makeOneLine

Converts a multi‐line string to a single line.

numberToString

numberToString overloads

operator+

Concatenate vectors of strings with source location.

operator+=

Append strings with source location information to vector of such.

popen_wrapper

Simple wrapper for Unix popen command.

prefixLines

Insert a prefix string before every line.

readFile

Reads entire text file.

readFileWithPos

Reads an entire text file.

readWordsInFile

Reads words from a file.

removeAnsiEscapes

Remove ANSI escape characters.

removeRedundantSubstrings

Remove redundant and blank lines.

replaceAllCopy

Replace a pattern with another one in a string

rightJustify

Right justify a string to specified width.

signedToHex

signedToHex2

split

Splits strings into parts.

splitStringIntoStrings

Splits string into substring based on a separator character.

stringToList

Split a string into substrings at line feeds.

stripDotsFromHeaderFileName

Remove leading dots.

stripFileSuffixFromFileName

Get the file name without the ".suffix".

stripPathFromFileName

Returns the last component of a path in a filesystem.

toBinary

Convert a number to a binary string.

toHex

toHex2

Convert a number to a hexadecimal and decimal string.

toNumber

toString

Generate C preprocessor #line directives.

tokenize

Split a string into a list based on a separator character.

trim

Trims white space from the beginning and end of a string.

unsignedToHex

unsignedToHex2

untab

Expand horizontal tab characters.

writeFile

Create a file.

operator<<

Stream insertion operators

Description

This name space provides functions for operating on strings.

Created with MrDocs