-1
I know that in other languages have methods to get the inverse of a String
and I’ve searched Dart, but I’m not finding anything.
I’m doing like this:
String inverter(String v) {
String inverso ='';
for (int i = v.length; i >= 1; i--) {
inverso += v.substring(i-1, i);
}
return inverso;
}
but it’s hard to have that in the code.
that’s what I was looking for, thanks for the help, and as for the 'complicated', it’s that I had to have this bit in my code and I knew I should have something ready for it like you showed.
– Deloam Amorim