cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

can't check a Char in UDF

brenm1989
Explorer
0 Kudos
255

Hi All

I want to check weather a char is a "\" [backslash].

char previousChar = 0;<br>if (previousChar != '\\') {<br>//do something<br>}

It works with Visual Studio Code (newest Java version)

But in the UDF everything after the " ' " appears blue.

I tried '\' or "\\" or "\" but nothing worked.

View Entire Topic
brenm1989
Explorer
0 Kudos

As UDF is based in an older Java version, you have to go with the char code.

\  is '\u005c'

if (previousChar != '\u005c') {
//do something
}