StringPairReplacer
Replaces characters in the value contained in the source attribute based on replacement key-value pairs.
参数
指定要执行字符替换的源属性。
指定源属性中的字符是否需要匹配替换对中指定的字符的情况,以便若要进行替换。
替换对参数是一个列表
键值键值......
Each instance of a key in the source string will be replaced with its corresponding value. If case-sensitive is no, then matching is done without regard to case differences. Both the keys and values may have multiple characters. Replacement is done in an ordered manner, so the key appearing first in the list will be checked first, and so on.
例如,如果源属性的值为:
鲍比
替代成对是:
b s o一个
结果将包含:
sassy
比利鲍伯
替代成对是:
y\ b a
结果将包含:
billaob
如果其中任何一个字符串都包含反斜杠\,它必须用反斜杠逃脱\。A single backslash not followed by a space will be ignored. For example, if the source attribute’s value was:
\billybob
And the replacement pairs were:
\\ B A.
结果将是:
aillybob
指定保存新字符串的属性的名称。
要替代使用正则表达式指定的子字符串,请使用StringReplacertransformer.
Editing Transformer Parameters
使用一组菜单选项,变压器参数s can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click除适用的参数旁边。有关更多信息,请参阅Transformer Parameter Menu Options。
Transformer Categories
搜索FME知识中心
搜索有关此变压器的样本和信息FME知识中心。
标签Keywords: StringPairedReplacer