Compare unicode string

  • Thread starter Thread starter Le Minh
  • Start date Start date
L

Le Minh

Hi, i write a application to search in a tree. each treenode is a unicode
text.
How to compare two unicode string to find extract node i want ?

Regards
Minh
 
All strings in .Net are Unicode strings. Everything is UTF-16 encoded.

Just use the standard compare algorithms (such as "="), and you'll be fine.

All you need is:
if (node1.text == "mytext")
 
I fetch some text from web. render text on a browser is good. But when i see
this text by quick watch, the character is unreadable. For that, when i
compare it with a unicode string, is not match
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top