Polaris: String.cc File Reference

String.cc File Reference

Go to the source code of this file.

Functions

static char * alloc_str (int size)
 String hex(int i){ strstream s; s.setf(ios::hex); s<<i<<''; char* pc=s.str(); String toret(pc); delete pc; return toret; }.
char * upcase_ch (const char *string)
int fortran_string_length (const char *string)
 Returns a copy of a string with all characters converted to upper case.
Boolean operator== (const char *str, const String &string)
Boolean operator!= (const char *str, const String &string)
Boolean operator< (const char *str, const String &string)
String operator+ (const char *str, const String &string)


Function Documentation

static char* alloc_str int  size  )  [static]
 

String hex(int i){ strstream s; s.setf(ios::hex); s<<i<<''; char* pc=s.str(); String toret(pc); delete pc; return toret; }.

Definition at line 38 of file String.cc.

Referenced by String::index_case(), String::operator+(), operator+(), String::operator+=(), and upcase_ch().

char* upcase_ch const char *  string  ) 
 

... Returns a copy of a string with all characters converted to upper case

Definition at line 48 of file String.cc.

References alloc_str().

Referenced by String::index_case(), main(), Symbol::name(), string_type(), Symbol::Symbol(), and String::upcase().

int fortran_string_length const char *  string  ) 
 

Returns a copy of a string with all characters converted to upper case.

Returns the length a char *string would be given in a Fortran program ... (this strips the enclosing quotes and any doubled internal quotes)

Definition at line 64 of file String.cc.

Referenced by string_type(), and StringConstExpr::StringConstExpr().

Boolean operator== const char *  str,
const String string
 

Definition at line 134 of file String.cc.

Boolean operator!= const char *  str,
const String string
 

Definition at line 140 of file String.cc.

Boolean operator< const char *  str,
const String string
 

Definition at line 146 of file String.cc.

String operator+ const char *  str,
const String string
 

Definition at line 152 of file String.cc.

References String::_defined, String::_len, String::_ptr, and alloc_str().

 © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved.  Fri Mar 25 23:06:31 2005