Home » Community » U++ community news and announcements » Multiple string-pattern replace
Multiple string-pattern replace [message #43693] |
Mon, 22 September 2014 11:38 |
|
mirek
Messages: 14039 Registered: November 2005
|
Ultimate Member |
|
|
String Replace(const String& s, const Vector<String>& find, const Vector<String>& replace)
String Replace(const String& s, const VectorMap<String, String>& fr)
WString Replace(const WString& s, const Vector<WString>& find, const Vector<WString>& replace)
WString Replace(const WString& s, const VectorMap<WString, WString>& fr)
Replaces multiple patterns with replace texts. When patterns and replaces are specified by VectorMap, keys are patterns. Text replaced is not searched for more instances of patterns. Longest pattern is always used (if patterns:replases are "hell":"hello" and "hello":"hell", then replacing within "hell hello" produces "hello hell").
|
|
|
Goto Forum:
Current Time: Fri Sep 20 20:03:05 CEST 2024
Total time taken to generate the page: 0.03114 seconds
|