In Java it is possible to format date-time information by means of formatter classes and methods.
Just a format string has to be passed as parameter.
Many format strings are possible.
Examples here
https://developer.android.com/reference/java/text/SimpleDateFormat#examples
Letters are used to refer to digits and information.
I am interested in formatting latitude/longitude information. It seems that the main formats are:
(latitude or longitude)
[+-]DDD.DDDDD
[+-]DDD:MM.MMMMM
DDD:MM:SS.SSSSS
(I do not know whether [+-] is missing from the third format)
see https://developer.android.com/reference/android/location/Location.html#constants_2
As you can see also with lat/long formatting, letters are used.
I would like to know if it is possible to use a format string like in the date-time case.
(by means of existing methods or creating them anew)
So a formatter accepts latitude,longitude and the format string, and return a formatted string. A very general method could handle also other coordinate formats.