Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
compare 2 strings
#8
When two strings seem equal but aren't, the reason may be:
- one of strings ends with newline or space and you don't see it.
- the strings have different newlines, for example \r\n and \n.
- one of strings has invisible characters.
- some characters that look the same actually have different Unicode codes.

To see all codes in a string, use function outb:
Code:
Copy      Help
str s="test"
outb s s.len 1


Messages In This Thread
compare 2 strings - by ilcaa - 08-02-2020, 05:40 PM
RE: compare 2 strings - by Kevin - 08-03-2020, 02:04 AM
RE: compare 2 strings - by Gintaras - 08-03-2020, 06:23 AM
RE: compare 2 strings - by ilcaa - 08-10-2020, 01:43 PM
RE: compare 2 strings - by Gintaras - 08-10-2020, 02:45 PM
RE: compare 2 strings - by ilcaa - 08-14-2020, 04:36 PM
RE: compare 2 strings - by Kevin - 08-14-2020, 05:37 PM
RE: compare 2 strings - by Gintaras - 08-14-2020, 07:22 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)