I have following data in my db row:
Espresso: 7,00
Double Espresso: 8,00
Ristretto: 7,00
Espresso Machiato: 8,00
Espresso Con Panna: 8,00
I write it on Word, then copy & paste to MySQL editor. When I save it, my IOS and Android apps cannot show the prices aligned because of the tab characters.
What is the best way to do that?
SPACE() function MySQL SPACE() returns the string containing a number of spaces specified as an argument.
The TRIM() function returns a string that has unwanted characters removed. Note that to remove the leading spaces from a string, you use the LTRIM() function. And to remove trailing spaces from a string, you use the RTRIM() function.
The best way- those 2 things are different data and are in different columns in your database, I would expect (if not, you need to fix your schema). So put the 2 strings in separate TextViews, and align the text view in xml.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With