"Fossies" - the Fresh Open Source Software Archive

Member "FreeBASIC-1.09.0-win64/examples/other-languages/C++/alias.cxx" (1 Jan 2022, 298 Bytes) of package /windows/misc/FreeBASIC-1.09.0-win64.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 //
    2 // compile as:
    3 //    g++ -c alias.cxx
    4 //    ar rcs libalias.a alias.o
    5 //
    6 
    7 #include <string.h>
    8 #include <ctype.h>
    9 
   10 namespace str 
   11 {
   12     void ucaseme( char *s ) 
   13     { 
   14         int len = strlen( s );
   15 
   16         for( int i = 0; i < len; i++ ) {
   17             int c = s[i];
   18             if( islower( c ) )
   19                 s[i] = toupper( c );
   20         }
   21     }
   22 }