WACUP

Preview Build Discussion => Preview Build Discussion => Topic started by: Nahsty on October 12, 2026, 01:15:42 PM

Title: [BUG] ATF: can't $replace with empty string anymore
Post by: Nahsty on October 12, 2026, 01:15:42 PM
long time no see.


recently updated to 1.99.55.25130 and noticed that titles are messed up.


turns out, you can no longer use empty string in $replace(), like $replace(%title%,string,) - it just stops parsing.
though, everything is displayed up until this function.



tried '' (double single quote): $replace(%title%,string,''), but it is parsed as a single quote,
tried %dummy%, %empty%: $replace(%title%,string,%empty%) - same result as with empty string,
even tried $null(): $replace(%title%,string,$nul()) - same result as above.


so, basically i can no longer use $replace() to remove parts of a string.
Title: Re: [BUG] ATF: can't $replace with empty string anymore
Post by: dro on October 15, 2026, 01:34:09 PM
Quote
Changed more of the internal ATF handling to avoid working out the length of strings when it's already been determined for a small performance improvement especially when doing 1000's of ATF calls
That's the reason for it not behaving correctly with build 25130 which was not intentional & will require a new build to resolve it.

I might also see about adding an extra parameter or a case insensitive version of $replace as it caught me out initially that the string I was testing with didn't match exactly.

[edit]
Have added an optional fourth parameter to what'll be part of the next build which is set to 1 (e.g. $replace(%title%,String,,1)) will treat string & String as the same. If not set or not what's expected then it'll keep doing it all as case-sensitive comparisons.