Main Page   Namespace List   Alphabetical List   Compound List   File List   Compound Members   File Members  

StringUtils.h File Reference

String utility functions. More...

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

void replace_str (std::string &to_change, const std::string &to_find, const std::string &replace_with)
void escape_shell_chars (std::string &to_change)
 escape all special shell characters from to_change

void remove_shell_chars (std::string &to_change)
 remove all special shell characters from to_change

void expand_tilde (std::string &tochange)
 expands the ~ character in a string to the users home directory

bool make_dir (const std::string &dir)
 make a directory creating any parent directories as necessary


Detailed Description

String utility functions.

Author:
Cameron Dorrat
Date:
Tue Nov 26 23:11:41 2002

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Definition in file StringUtils.h.


Function Documentation

void escape_shell_chars string &    to_change
 

escape all special shell characters from to_change

Parameters:
to_change the string to modify

Definition at line 78 of file StringUtils.cpp.

Referenced by PlayListConverter::insert_subst().

void expand_tilde string &    tochange
 

expands the ~ character in a string to the users home directory

Note:
doesnt replace ~username references
Parameters:
tochange teh string to modify

Definition at line 98 of file StringUtils.cpp.

Referenced by PlayListConverter::change_working_dir(), PlayListConverter::get_config_file(), PlayListConverter::load_config(), and PlayListConverter::load_format().

bool make_dir const std::string &    dir
 

make a directory creating any parent directories as necessary

Parameters:
dir the directory to make
Returns:
true on success

Definition at line 115 of file StringUtils.cpp.

Referenced by PlayListConverter::change_working_dir(), and PlayListConverter::open_output().

void remove_shell_chars string &    to_change
 

remove all special shell characters from to_change

Parameters:
to_change the string to modify

Definition at line 60 of file StringUtils.cpp.

Referenced by PlayListConverter::insert_subst().

void replace_str std::string &    to_change,
const std::string &    to_find,
const std::string &    replace_with
 

Referenced by EmpParser::build_track_url(), and PlayListConverter::insert_subst().


Generated on Sat May 3 09:16:16 2003 for empxform by doxygen1.3-rc3