trim and pure apparently whitespace strings

Discussion in 'ASP .Net' started by John A Grandy, Nov 22, 2004.

  1. has anyone encountered an apparently pure whitespace string (debug mode
    mouse-over) that when TRIM'd does not result in a null-string ?

    how to determine any special characters that may be present in the string ?
     
    John A Grandy, Nov 22, 2004
    #1
    1. Advertising

  2. John A Grandy

    Dan Bass Guest

    trimming a string with just spaces will return an empty string ("") not a
    null string (null)...

    The easiest way to evaluate the string would be to write it to disk. Create
    a file and write the string out, then analyse the file in a hex editor to
    check for excape characters.


    "John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
    news:...
    > has anyone encountered an apparently pure whitespace string (debug mode
    > mouse-over) that when TRIM'd does not result in a null-string ?
    >
    > how to determine any special characters that may be present in the string
    > ?
    >
    >
     
    Dan Bass, Nov 22, 2004
    #2
    1. Advertising

  3. i was using "null-string" in the traditional sense of a reference to a
    String datatype object that consists of 0 characters -- not a
    "null-reference" (a reference to Nothing)

    actually, i found this very useful function for discovering hidden
    characters in a string:

    Uri.HexEscape()



    "Dan Bass" <danielbass [at] postmaster [dot] co [dot] uk> wrote in message
    news:...
    > trimming a string with just spaces will return an empty string ("") not a
    > null string (null)...
    >
    > The easiest way to evaluate the string would be to write it to disk.

    Create
    > a file and write the string out, then analyse the file in a hex editor to
    > check for excape characters.
    >
    >
    > "John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
    > news:...
    > > has anyone encountered an apparently pure whitespace string (debug mode
    > > mouse-over) that when TRIM'd does not result in a null-string ?
    > >
    > > how to determine any special characters that may be present in the

    string
    > > ?
    > >
    > >

    >
    >
     
    John A Grandy, Nov 23, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. FAQ server
    Replies:
    0
    Views:
    173
    FAQ server
    Aug 29, 2006
  2. FAQ server
    Replies:
    0
    Views:
    160
    FAQ server
    Oct 26, 2006
  3. FAQ server
    Replies:
    6
    Views:
    250
    Jonas Raoni
    Dec 25, 2006
  4. FAQ server
    Replies:
    26
    Views:
    346
    Dr J R Stockton
    Feb 26, 2007
  5. FAQ server
    Replies:
    2
    Views:
    157
    -Lost
    Apr 24, 2007
Loading...

Share This Page