Hello, I recently just encountered a problem within my program. After using a “get text” activitie in a pdf document, the value that it assigns in a string variable is the following:
The “@” it’s not even part of the string text. After this I need to compare that value with another to see if they are equal but as the string contains this character the validation is never fulfilled.
What can I do to remove this value? I tried to use a .remove method but since the @ is not part of the text string it is not removed.
I hope you can help me, thanks.
the @ char can be interpretated as “it’s a verbatim string literal . It means that escaping isn’t applied”
can you try in watch panel and share the result with us
this retruns false as ProductID: 359 from compare has a space on end. So is not equal:
harmonized it e.g. by:
out_fileID.Trim().Equals("ProductID: 359 ".Trim())
take care about copy paste issues which changes " to “
Yes, and I add the space because it is part of the characters that the “get tex” returns me, but this is the result with the second form you mentioned.
This is the part where I compare them, I know that there are some extra .toString but it is because I was testing because the values were not equal
So maybe it is something wrong inside the If statement?
better to inspect within the watch panel with the current runtime values
- set breakpoint on if and debug
- when it is paused open watch panel (between locals and immediate)
- inspect the values from list_item and fileID variable
I just used the .trim method in a variable, thank you.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.