Index Page
cspice_iswhsp
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_ISWHSP returns a boolean indicating whether an 
   input string contains only whitespace characters (TRUE)
   or not (FALSE).

   For important details concerning this module's function, please refer to
   the CSPICE routine iswhsp_c.

I/O

   
   Given an arbitrary string, 'str', determine if the string
   contains only whitespace characters:
   
      only_whitespace = cspice_iswhsp( str )
      if ( only_whitespace ) the print, 'Whitespace string'
   

Examples


   Any numerical results shown for this example may differ between
   platforms as the results depend on the SPICE kernels used as input
   and the machine specific arithmetic implementation.

   
      ;;
      ;; A single space signals the whitespace flag...
      ;;
      if ( cspice_iswhsp( ' ' ) ) then print, 'Whitespace' $
      else print, 'Not whitespace.'
   
   IDL outputs:
   
         Whitespace
   
   
      ;;
      ;; ...but a non-whitespace character in a string with a
      ;; whitespace does not.
      ;;
      if ( cspice_iswhsp( ' x' ) ) then print, 'Whitespace' $
      else print, 'Not whitespace.'
   
   IDL outputs:
   
         Not whitespace.
   
   
      ;;
      ;; A combination of whitespace and non-whitespace.
      ;;
      if ( cspice_iswhsp( ' a b c ' ) ) then print, 'Whitespace' $
      else print, 'Not whitespace.'
   
   IDL outputs:
   
         Not whitespace.
   
   
      ;;
      ;; Multiple space characters signals the whitespace flag...
      ;;
      if ( cspice_iswhsp( '     ' ) ) then print, 'Whitespace' $
      else print, 'Not whitespace.'
   
   IDL outputs:
   
         Whitespace
   
   
      ;;
      ;; ...as does an empty string.
      ;;
      if ( cspice_iswhsp( '' ) ) then print, 'Whitespace' $
      else print, 'Not whitespace.'
   
   IDL outputs:
   
         Whitespace
   
   Note: the Icy interface does not pass escaped whitespace
   markers \t, \f, \r, \n, \v as whitespace. cspice_iswhsp
   signals these string markers as non-whitespace.

Particulars


   None.

Required Reading


   ICY.REQ

Version


   -Icy Version 1.0.0, 16-JUN-2003, EDW (JPL)

Index_Entries

 
   read a non-blank line from a text file 
 



Wed Apr  5 17:58:02 2017