Quantcast
Channel: How to delete/detect any emoji as a whole from a string in Flutter? - Stack Overflow
Viewing all articles
Browse latest Browse all 10

Answer by Tinus Jackson for How to delete/detect any emoji as a whole from a string in Flutter?

$
0
0

Its a bit unclear to what you want to check. I suggest you remove the -1 from the substring because it will break the emoji's code snip

 void main() {    var str = "abc😀";   var newStr = str.substring(0, str.length); // i removed it here   print(newStr);   print(newStr.runes);   print(str.runes); }

This will give the output of

abc😀(97, 98, 99, 128512)(97, 98, 99, 128512)

Tested in https://dartpad.dartlang.org/


Viewing all articles
Browse latest Browse all 10

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>