Main Page | Namespace List | Class List | File List | Namespace Members | Class Members | File Members

stringutils.hpp File Reference

This file provides some string handling utilities. More...

#include <string>

Go to the source code of this file.

Functions

std::string changeExtension (std::string const &to_change, std::string const &new_ext)
 String extension change utility.

std::string operator * (std::string const &to_multiply, unsigned multiplier)
bool endsWith (std::string const &test_string, std::string const &ending)
std::string upperCase (std::string const &to_convert)


Detailed Description

This file provides some string handling utilities.

Copyright (c) 2004, Thomas Guest. All rights reserved.


Function Documentation

std::string changeExtension std::string const &  to_change,
std::string const &  new_ext
 

String extension change utility.

Returns:
A string based on the input string, its extension changed to the new extension.
Examples: changeExtension("section.bin", ".txt") --> "section.txt"
changeExtension("section", ".txt") --> "section.txt"

bool endsWith std::string const &  test_string,
std::string const &  ending
 

Returns:
True if the test string ends with the supplied ending.
Example endsWith("section_length", "length") --> true

std::string operator * std::string const &  to_multiply,
unsigned  multiplier
 

Returns:
The input string repeated by the input multiplier
Example "XX" * 3 --> "XXXXXX"

std::string upperCase std::string const &  to_convert  ) 
 

Returns:
An uppercase version of the input string.


Generated on Fri Nov 26 15:31:03 2004 for DVB Codec by doxygen 1.3.7