java.lang.Object | ||
↳ | java.text.Format | |
↳ | humanize.text.MaskFormat |
MaskFormat is used to format and parse strings by the mean of a mask. Underscore '_' is used as default place holder for the next message character. The other characters within the mask are inserted between the message symbols. The backslash '\' is escape symbol. Combination of '\?' will include '?' in the human-readable message, where '?' can be any character including underscore '_' and backslash '\'. Hash '#' can be used to skip (delete) a character from the original message.
Input | Mask | Output |
---|---|---|
313378444416 | _ _____ _____ _ | 3 13378 44441 6 |
A58818501 | _-__-_____/_ | A-58-81850/1 |
A/5881850 1 | _# __ _____#-_ | A 58 81850-1 |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets the format factory.
| |||||||||||
Gets the format name that will be registered.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.text.Format
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
humanize.spi.FormatProvider
|
Gets the format name that will be registered. If you want to register multiple names for a format then return a String with the names concatenated by a vertical bar character '|'.