|
|
Re: How to remove the '\' before each single quote in a string added by the formatter ? [message #1859918 is a reply to message #1859901] |
Wed, 05 July 2023 11:57 |
Ronan Babin Messages: 18 Registered: July 2023 |
Junior Member |
|
|
I'm not sure what the value converter is used for...
Searching in the project, I'm seeing that a specific value converter has been added for the STRING terminal.
public class UnaStringValueConverter extends STRINGValueConverter
{
....
}
The method convertFromString() has been override with a small change. In the switch... case processing the escaped character, there is one new one added. The rest of the code is identical.
...
case '\'':
out[outLen++] = '\'';
break;
case '\\':
out[outLen++] = '\\';
break;
case '/': // This is the new one added !!!!!
out[outLen++] = '/';
break;
default:
I've just ran the debugger on this class to see the input and the output.
The input parameter 'literal' value is: "\'GX1:SLEWRATE:MAX\'".
At the end of the function, on the return line, the parameter 'out' of the String constructor is: [', G, X, 1, :, S, L, E, W, R, A, T, E, :, M, A, X, ', , , ].
But I don't really know how I should interpret this and what the function is supposed to do.
[Updated on: Wed, 05 July 2023 11:58] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03665 seconds