Latest WACUP public preview for x86 & x64 is build #25130 (September 30th 2026) (x86 & x64 changelogs)
Latest restricted WACUP beta release is build #25130 (September 30th 2026) (x86 & x64 changelogs)

Author Topic: [BUG] ATF: can't $replace with empty string anymore  (Read 54 times)

Nahsty

  • Full Member
  • ***
  • Posts: 13
    • View Profile
[BUG] ATF: can't $replace with empty string anymore
« 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.
« Last Edit: Yesterday at 08:05:26 AM by Nahsty »

dro

  • Admin / WACUP Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 5927
    • View Profile
    • WACUP (Winamp Community Update Project)
Re: [BUG] ATF: can't $replace with empty string anymore
« Reply #1 on: Yesterday at 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.
« Last Edit: Yesterday at 02:03:59 PM by dro »