I am trying to write a search text implementation in Java
With the below code below:
public String log(Object... source) {...//simple System.out.println for debugging purposes}
public boolean searchInLoweCase(CharSequence searchTag, CharSequence containsTag) {
var contains = containsTag.toString().contains(searchTag);
log("search", "searchTag", searchTag, contains, "containsTag", containsTag);
IntStream.range(0, searchTag.length()).forEachOrdered(charIdx -> {
log("search",
"searchTag[" + charIdx + "].charAt/codePointAt/int", searchTag.charAt(charIdx), searchTag.codePointAt(charIdx), "as", (int) searchTag.charAt(charIdx),
"containsTag[" + charIdx + "].charAt/codePointAt/int", containsTag.charAt(charIdx), searchTag.codePointAt(charIdx), "as", (int) containsTag.charAt(charIdx)
);
});
return contains;
}
the output is
{searchTag, i, true, containsTag, i̇letişim}
{searchTag[0].charAt/codePointAt/int, i, 105, as, 105, containsTag[0].charAt/codePointAt/int, i, 105, as, 105}
the output is
{searchTag, il, false, containsTag, i̇letişim}
{searchTag[0].charAt/codePointAt/int, i, 105, as, 105, containsTag[0].charAt/codePointAt/int, i, 105, as, 105}
{searchTag[1].charAt/codePointAt/int, l, 108, as, 108, containsTag[1].charAt/codePointAt/int, ̇, 108, as, 775}
Here you can see the hidden character there.
I tried to remove the hidden character with answer here;
however it did not work.
Did you exprienced it before?