Text content
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
Labels:
- Labels:
-
TouchGFX
1 ACCEPTED SOLUTION
Accepted Solutions
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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
Osman SOYKURT
ST Software Developer | TouchGFX
ST Software Developer | TouchGFX
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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
Osman SOYKURT
ST Software Developer | TouchGFX
ST Software Developer | TouchGFX