Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - squish() remove spaces from string while converting to lowercase http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 squish()            Remove spaces from string while converting to lowercase
------------------------------------------------------------------------------
 Declaration
   string.hdr

 Syntax
   func char squish extern
   param const char cString

 Arguments
   cString is a characters string to convert.

 Return
   A converted derivative of the input string.

 Description
   The squish() function removes all spaces and tabs from a character string
   and converts all upper case characters to lower case, including the
   international extended characters.

 Example
   #define EXAMPLE_STRING
   #include example.hdr

   // Index on squish to combine first/lastname without regard to the
   // spacing of the names
   
   dbfdef names
      char( 20 ) first
      char( 20 ) last
   enddef
   
   indexdef
      char(30) iname squish( names->first + names->last )
   enddef
   
   proc Test_squish
   ? squish( "Gretchen Perkic" )       // gretchenperkic
   ? squish( "gretchen   perkic" )     // gretchenperkic
   ? squish( "GRETCHEN    Perkic" )    // gretchenperkic
   endproc

   proc main
   Test_squish()
   endproc

See Also: normalize()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson