engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
FStringFormatter类 参考

A string formatter is responsible for formatting string patterns using a set of named, or ordered arguments 更多...

#include <StringFormatter.h>

Public 成员函数

FString Format (const TCHAR *InExpression, const TArray< FStringFormatArg > &InArgs) const
 Format the specified string using the specified arguments. 更多...
 
FString Format (const TCHAR *InExpression, const TMap< FString, FStringFormatArg > &InArgs) const
 Format the specified string using the specified arguments. 更多...
 
TValueOrError< FString, FExpressionError > FormatStrict (const TCHAR *InExpression, const TArray< FStringFormatArg > &InArgs) const
 Format the specified string using the specified arguments. 更多...
 
TValueOrError< FString, FExpressionError > FormatStrict (const TCHAR *InExpression, const TMap< FString, FStringFormatArg > &InArgs) const
 Format the specified string using the specified arguments. 更多...
 

详细描述

A string formatter is responsible for formatting string patterns using a set of named, or ordered arguments

成员函数说明

◆ Format() [1/2]

FString FStringFormatter::Format ( const TCHAR *  InExpression,
const TArray< FStringFormatArg > &  InArgs 
) const
inline

Format the specified string using the specified arguments.

Replaces instances of {0} with indices from the given array matching the index specified in the token

参数
InExpressionA string representing the format expression
InArgsAn array of ordered arguments that match the tokens specified in InExpression
返回
A string containing the formatted text

◆ Format() [2/2]

FString FStringFormatter::Format ( const TCHAR *  InExpression,
const TMap< FString, FStringFormatArg > &  InArgs 
) const
inline

Format the specified string using the specified arguments.

Replaces instances of { Argument } with keys in the map matching 'Argument'

参数
InExpressionA string representing the format expression
InArgsA map of named arguments that match the tokens specified in InExpression
返回
A string containing the formatted text

◆ FormatStrict() [1/2]

TValueOrError< FString, FExpressionError > FStringFormatter::FormatStrict ( const TCHAR *  InExpression,
const TArray< FStringFormatArg > &  InArgs 
) const
inline

Format the specified string using the specified arguments.

Replaces instances of {0} with indices from the given array matching the index specified in the token

参数
InExpressionA string representing the format expression
InArgsAn array of ordered arguments that match the tokens specified in InExpression
返回
A string containing the formatted text, or an error where InExpression is ill-formed, or contains undefined arguments

◆ FormatStrict() [2/2]

TValueOrError< FString, FExpressionError > FStringFormatter::FormatStrict ( const TCHAR *  InExpression,
const TMap< FString, FStringFormatArg > &  InArgs 
) const
inline

Format the specified string using the specified arguments.

Replaces instances of { Argument } with keys in the map matching 'Argument'

参数
InExpressionA string representing the format expression
InArgsA map of named arguments that match the tokens specified in InExpression
返回
A string containing the formatted text, or an error where InExpression is ill-formed, or contains undefined arguments

该类的文档由以下文件生成: