public class LcText extends Object
Text picture patterns are used to parse and format text strings. Here are the metasymbols that form valid text picture patterns:
LcText to reformat a text string
import com.adobe.xfa.ut.LcNum;
...
LcText text = new LcText("Agent 007", "'Agent '999");
if (text.isValid())
String s = text.format("999' bottles of beer ...'");
text = new LcText("Ben-Vindo a Cozumel.",
"'Ben-Vindo a 'AAAAAAA.", "es_MX");
if (text.isValid())
String s = text.format("'Playa ' XXXXXXX");
| Modifier and Type | Field and Description |
|---|---|
static String |
TEXT_PICTURE_SYMBOLS
LcText pattern symbols: 9AO0X.
|
| Constructor and Description |
|---|
LcText(String text,
String locale)
Instantiates an LcText object from the given text
and in the locale given.
|
LcText(String text,
String pat,
String locale)
Instantiates an LcText object from the given text in the pattern
given and in the locale given.
|
| Modifier and Type | Method and Description |
|---|---|
String |
format(String pat)
Formats this object according to given text pattern string.
|
static int |
getSymbolCount(String pic)
Parse the text picture and return the number of symbols the picture implies.
|
String |
getText()
Gets this object's parsed text.
|
boolean |
isValid()
Determines if this object is valid.
|
boolean |
parse(String str,
String pat)
Parses the given string according to the text pattern given.
|
public static final String TEXT_PICTURE_SYMBOLS
public LcText(String text, String locale)
text - a text string.locale - a locale name. When empty, it will default
to the default locale.public LcText(String text, String pat, String locale)
text - a text string.pat - a text pattern string used to parse the given text.locale - a locale name. When empty, it will default
to the default locale.public String format(String pat)
pat - a text pattern string.public static int getSymbolCount(String pic)
pic - - a picture pattern string.public String getText()
public boolean isValid()
Copyright © 2010 - 2020 Adobe. All Rights Reserved