string.format example
Example 1: formartted string java
String str = String.format( "Hello \n World \n my name is %s and i'm %d years old" , "Paul", 27);
Example 2: string format
fun Double.format(digits: Int) = "%.${digits}f".format(this)
String str = String.format( "Hello \n World \n my name is %s and i'm %d years old" , "Paul", 27);
fun Double.format(digits: Int) = "%.${digits}f".format(this)