Code: Select all
v15.20.0205 - 2015-05-28 10:26
+ SC replacelist enhanced. Added a scope parameter:
Syntax: replacelist(string, searchlist, [replacelist], [delimiter], [matchcase], [scope])
scope: Matching scope (what to match in string)
0 = substring [default]
1 = whole words
2 = whole string
Examples:
text replacelist("Hello, Taxi Driver!", "He|Hello|Hello, Taxi Driver!", "Ha|Hi|Taxi!", "|", 0, 0); //Hallo, Taxi Driver!
text replacelist("Hello, Taxi Driver!", "He|Hello|Hello, Taxi Driver!", "Ha|Hi|Taxi!", "|", 0, 1); //Hi, Taxi Driver!
text replacelist("Hello, Taxi Driver!", "He|Hello|Hello, Taxi Driver!", "Ha|Hi|Taxi!", "|", 0, 2); //Taxi!
Note how in lines 1 and 2 there are two replacements (Hello->Hi; TaxiDriver->Taxi Driver):
text replacelist("Hello, TaxiDriver!", "He|Hello|TaxiDriver|Hello, TaxiDriver!", "Ha|Hi|Taxi Driver|Taxi!", "|", 0, 0); //Hallo, Taxi Driver!
text replacelist("Hello, TaxiDriver!", "He|Hello|TaxiDriver|Hello, TaxiDriver!", "Ha|Hi|Taxi Driver|Taxi!", "|", 0, 1); //Hi, Taxi Driver!
text replacelist("Hello, TaxiDriver!", "He|Hello|TaxiDriver|Hello, TaxiDriver!", "Ha|Hi|Taxi Driver|Taxi!", "|", 0, 2); //Taxi!
Remember that replacelist always looks for the match left-most in string, not left-most in searchlist:
text replacelist("abc", "ab|b", "XY|B", "|"); //XYc
text replacelist("abc", "b|ab", "B|XY", "|"); //XYc as well! (not aBc)
Only if several matches are left-most in string then the left-most in searchlist wins:
text replacelist("Taxi", "a,ax", "i,ox", ","); //Tixi
text replacelist("Taxi", "ax,a", "ox,i", ","); //Toxi
* Tree: Now the target area for hitting the expansion icons adjusts to the
screen DPI. So it's easier to hit now on high DPI.
! Show Age: Minor glitches. Fixed.