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

gnStringTools.h

Go to the documentation of this file.
00001 /////////////////////////////////////////////////////////////////////////////
00002 // File:            gnStringTools.h
00003 // Purpose:         Random string manipulation tools
00004 // Description:     Random string manipulation tools
00005 // Changes:        
00006 // Version:         libGenome 0.5.1 
00007 // Author:          Aaron Darling 
00008 // Modified by:     
00009 // Copyright:       (c) Aaron Darling 
00010 // Licenses:        See COPYING file for details 
00011 /////////////////////////////////////////////////////////////////////////////
00012 
00013 #ifndef _gnStringTools_h_
00014 #define _gnStringTools_h_
00015 
00016 #include <iostream>
00017 #include <string>
00018 #include <vector>
00019 #include <stdlib.h>
00020 #include <stdio.h>
00021 #include "gn/gnDefs.h"
00022 
00023 unsigned int removeSpace(string &str);
00024 void removeEndSpace(string &str);
00025 
00026 bool isNewLine(char ch);
00027 bool isWhiteSpace(char ch);
00028 bool isSpace(char ch);
00029 
00030 string uintToString(unsigned int value);
00031 
00032 string ulongToString(unsigned long value);
00033 
00034 string charArrayToString( char *charArray, unsigned int length);
00035 
00036 bool isBase(char base);
00037 void BaseCount(const string& bases, gnSeqI& a_count, gnSeqI& c_count, gnSeqI& g_count, gnSeqI& t_count, gnSeqI& other_count);
00038 
00039 unsigned int parseValue(string &valueString);
00040 int parseUintValue(string &valueString);
00041 int parseIntValue(string &valueString);
00042 
00043 vector< string > tokenizeString( const string &str, char delimiter  = '\t' );
00044 vector< string > tokenizeString( const char* str, unsigned int len, char delimiter = '\t' );
00045 
00046 // **** MAKE SURE YOU STANDARIZE ALL PATHS ****
00047 void standarizePathString( string &oFileName );
00048 
00049 // **** ONLY '/' IS USED for file seperation on all below functions ****
00050 
00051 // make more robust to handle dir and files
00052 string getPathString( string oFileName );
00053 // look for '/' at end
00054 string getFileString( string oFileName );
00055 // look for '/' before '.'
00056 string getExtString( string oFileName );
00057 // look for '/' before '.'
00058 string getFileNoExtString( string oFileName );
00059 
00060 #endif  // _gnStringTools_h_

Generated on Mon Feb 3 02:34:42 2003 for libGenome by doxygen1.3-rc3