Forum Discussion
How List.PositionOF works
More myths about this mysterious ""(zero-length string)
- Anonymous5 years agoNot applicable
this seems to me consistent with the fact that the string "" does not contain any characters and therefore there is no corresponding number: it does not exist in the ascii table
do not you think?- CNENFRNL5 years agoCommunity Champion
Anonymous Yes, my point is since no ascii code is assigned to "", why Text.PositionOf returns positions of "" in "aba", whereas "aba" doesn't split at those positions?
Nowhere to find an explanation to the mechanism to parse "" by PQ. 🤔
- Anonymous5 years agoNot applicable
Hi CNENFRNL ,
I came up with this idea, to give a possible explanation to your interesting observation:
"" is obviously not a character but it is a text (empty but text, while the "empty" character does not exist).
If "" could be used as a character it would become a sort of wildcard like the "?".
In fact, if you use the function:
Text.EndsWith ("abc", "c")
gives TRUE
and the same happens with
Text.EndsWith ("abc", "") -> TRUE.
From this we could derive that "c" = "" 🙂 and if it holds for c, it holds for any other character.