2023-01-12 04:18 AM
Hello, I want to compare text area content with enum TEXTS. How can I do this?
Solved! Go to Solution.
2023-01-16 12:40 AM
Hello heyo,
I think you'll need to use the getText() function and the Unicode::strncmp() function :
int result = Unicode::strncmp(textArea1.getTypedText().getText(), TypedText(T_TEXT1).getText(), Unicode::strlen(textArea1.getTypedText().getText()));
touchgfx_printf("result : %d", result);
//result return 0 if they're identical, 1 if the strings are differents
/Osman
2023-01-16 12:40 AM
Hello heyo,
I think you'll need to use the getText() function and the Unicode::strncmp() function :
int result = Unicode::strncmp(textArea1.getTypedText().getText(), TypedText(T_TEXT1).getText(), Unicode::strlen(textArea1.getTypedText().getText()));
touchgfx_printf("result : %d", result);
//result return 0 if they're identical, 1 if the strings are differents
/Osman