Hi,
I’m checking the variables in Debug mode and I see that one of the string variables has a strudel prefix:
Does anyone know what does it mean ?
Hi,
I’m checking the variables in Debug mode and I see that one of the string variables has a strudel prefix:
Does anyone know what does it mean ?
It indicates a verbatim string literal
Verbatim string literals are a feature in C# (the language that UiPath uses for custom activities and workflows) that tells the compiler to treat the string exactly as it’s defined, including escape characters.
For example:
@"C:\MyFolder\MyFile.txt"
will be treated as the string C:\MyFolder\MyFile.txt
."C:\\MyFolder\\MyFile.txt"
would be interpreted as C:\MyFolder\MyFile.txt
.Other variables may not have this representation because their values might not contain escape characters or backslashes
Hope this clarifies
Cheers @Udiar
With some references to the docu resources
we do see this in the e.g. debugging panels and can interpret as described
Kindly note the handling of double quotes
""
\"
but in both cases it is visualization but not the value content
Thank you.
Since the variable doesn’t contain backslashes, I understand from your reply that the variable probably contains escape character/s. How can I remove any escape characters from the variable?
Keep in mind the differences of definition and value
L1: we defined as string using withing a doublequote and escaped it with a second doublequote
L2: we check if the string contains a doublequote (it does), but for the definition we again escaped it with another one
L3: we showcased that no \ is within the content
L4: we showcased that no 2 subsequent doublequotes are within the content
And also:
U can use a replace method to avoid that using assign activity
Strinput = Strinput.ToString.Replace(“your special character”, “ any new character”)
But that’s not required it just comes when looked at LOCALS panel and @ symbol won’t come with actual value
So you are good to go
Just be aware is what I would suggest
Hope this clarifies