MessageFormat.AutoQuoteApostrophe(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
<strong>[icu]</strong> Converts an 'apostrophe-friendly' pattern into a standard pattern.
[Android.Runtime.Register("autoQuoteApostrophe", "(Ljava/lang/String;)Ljava/lang/String;", "", ApiSince=24)]
public static string? AutoQuoteApostrophe (string? pattern);
[<Android.Runtime.Register("autoQuoteApostrophe", "(Ljava/lang/String;)Ljava/lang/String;", "", ApiSince=24)>]
static member AutoQuoteApostrophe : string -> string
Parameters
- pattern
- String
the 'apostrophe-friendly' pattern to convert
Returns
the standard equivalent of the original pattern
- Attributes
Remarks
<strong>[icu]</strong> Converts an 'apostrophe-friendly' pattern into a standard pattern. <em>This is obsolete for ICU 4.8 and higher MessageFormat pattern strings.</em> It can still be useful together with java.text.MessageFormat
.
See the class description for more about apostrophes and quoting, and differences between ICU and java.text.MessageFormat
.
java.text.MessageFormat
and ICU 4.6 and earlier MessageFormat treat all ASCII apostrophes as quotes, which is problematic in some languages, e.g. French, where apostrophe is commonly used. This utility assumes that only an unpaired apostrophe immediately before a brace is a true quote. Other unpaired apostrophes are paired, and the resulting standard pattern string is returned.
<b>Note</b>: It is not guaranteed that the returned pattern is indeed a valid pattern. The only effect is to convert between patterns having different quoting semantics.
<b>Note</b>: This method only works on top-level messageText, not messageText nested inside a complexArg.
Java documentation for android.icu.text.MessageFormat.autoQuoteApostrophe(java.lang.String)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.