U++ framework
Do not panic. Ask here before giving up.

Home » Community » U++ community news and announcements » Multiple string-pattern replace
Multiple string-pattern replace [message #43693] Mon, 22 September 2014 11:38
mirek is currently offline  mirek
Messages: 14290
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").
Previous Topic: ide: Block replace now provides new grep-like options
Next Topic: UTF8 support in Win32 console (Cout & ide)
Goto Forum:
  


Current Time: Sat May 02 13:34:27 GMT+2 2026

Total time taken to generate the page: 0.00739 seconds