Hi. I'm probably missing some basic essential stuf...
# getting-started
v
Hi. I'm probably missing some basic essential stuff, if so could someone please point me into a correct direction? I have a string
"aaa\"aaa"
. When I evaluate an expression while in debug and check the length of the string, then it shows it is 8. But checking the same in the scratch file - it shows length equal to 7. Why is it so? What am I missing?
c
One of them contains an embedded
"
character that is being displayed as
\"
, whereas the other (longer) one contains
\"
.
k
Exactly what Chris said. It's an unfortunate coincidence of the fact the debugger displays string values by simply putting their
toString
representation inside quotes, which gives them the misleading resemblance to string literals.