语言

MessageFormat.ApplyPattern 方法

定义

重载

名称 说明
ApplyPattern(String)

设置此消息格式使用的模式。

ApplyPattern(String, MessagePattern+ApostropheMode)

[icu]设置此消息格式使用的 ApostropheMode 和模式。

ApplyPattern(String)

设置此消息格式使用的模式。

[Android.Runtime.Register("applyPattern", "(Ljava/lang/String;)V", "GetApplyPattern_Ljava_lang_String_Handler", ApiSince=24)]
public virtual void ApplyPattern(string? pttrn);
[<Android.Runtime.Register("applyPattern", "(Ljava/lang/String;)V", "GetApplyPattern_Ljava_lang_String_Handler", ApiSince=24)>]
abstract member ApplyPattern : string -> unit
override this.ApplyPattern : string -> unit

参数

pttrn
String

此消息格式的模式

特性

注解

设置此消息格式使用的模式。 分析模式并缓存用于简单参数类型的 Format 对象。 模式及其解释在类说明中指定。

Java文档android.icu.text.MessageFormat.applyPattern(java.lang.String)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

ApplyPattern(String, MessagePattern+ApostropheMode)

[icu]设置此消息格式使用的 ApostropheMode 和模式。

[Android.Runtime.Register("applyPattern", "(Ljava/lang/String;Landroid/icu/text/MessagePattern$ApostropheMode;)V", "GetApplyPattern_Ljava_lang_String_Landroid_icu_text_MessagePattern_ApostropheMode_Handler", ApiSince=24)]
public virtual void ApplyPattern(string? pattern, Android.Icu.Text.MessagePattern.ApostropheMode? aposMode);
[<Android.Runtime.Register("applyPattern", "(Ljava/lang/String;Landroid/icu/text/MessagePattern$ApostropheMode;)V", "GetApplyPattern_Ljava_lang_String_Landroid_icu_text_MessagePattern_ApostropheMode_Handler", ApiSince=24)>]
abstract member ApplyPattern : string * Android.Icu.Text.MessagePattern.ApostropheMode -> unit
override this.ApplyPattern : string * Android.Icu.Text.MessagePattern.ApostropheMode -> unit

参数

pattern
String

此消息格式的模式

aposMode
MessagePattern.ApostropheMode

新的 ApostropheMode

特性

注解

[icu]设置此消息格式使用的 ApostropheMode 和模式。 分析模式并缓存用于简单参数类型的 Format 对象。 模式及其解释在类说明中指定。 此方法最好只在给定对象上使用一次,以避免混淆模式,在构造对象后使用空模式字符串来最大程度地减少开销。

Android 参考。android.icu.text.MessageFormat.applyPattern

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于