2

When copy DEC value from win calculator have an extra sign in the start and the end of a string. "‭1206462665545088‬" != "1206462665545088"

Hex view

and string.Trim() does not remove them.

Why Trim does not remove whitespace character? How else to remove these signs?

Jamal
  • 398
  • 4
  • 9
  • 3
    Try this: https://stackoverflow.com/questions/15259275/removing-hidden-characters-from-within-strings – Rand Random Jul 10 '20 at 17:51
  • 1
    Tried a little since, I was wondering why .IsControl didn't return true https://dotnetfiddle.net/ithLxG – Rand Random Jul 10 '20 at 18:28
  • JIC `string.Equals(wrongStr, correctStr, StringComparison.InvariantCulture) == true`. Not sure ow it works though =) – Guru Stron Jul 10 '20 at 19:15
  • How are you copying "DEC value from win calculator" exactly? Why are you showing a memory dump? `String.Trim` only removes whitespace characters - why do you think "extra sign" (whatever that means) are whitespace? – NetMage Jul 10 '20 at 20:33
  • Can you show the code? How do you read the Clipboard? – aepot Jul 10 '20 at 22:09

0 Answers0