ad_string_replace_once string pattern replacementWhat it does:
Replace the first occurrence of PATTERN with REPLACEMENT; return unaltered STRING if PATTERN not foundDefined in: /web/philip/tcl/ad-redirect.tcl
Source code:
set start [string first $pattern $string] if { $start == -1 } { return $string } else { set string_front [string range $string 0 [expr $start - 1]] set string_end [string range $string [expr $start + [string length $pattern]] end] append result $string_front $replacement $string_end return $result }