NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use
trunk.foswiki.org to view this page for some minimal testing.
Use
Item9693 for docu changes for 1.2 and 2.0.
The SUBSTITUTE function doesn't return the correct result when
text =
old and
replace is empty.
For example, I expect the following to produce an empty result:
%CALC{"$SUBSTITUTE(Public,Public)"}%
Instead it produces the string
Public
Note that
%CALC{"$SUBSTITUTE(Public,Public,Foo)"}%
produces
Foo
--
TWiki:Main/DiabJerius - 16 Oct 2007
yes this has also annoyed me
And there is similar problem with REPLACE which cannot return a number 0 or an empty string either even though there can be good use for both in applications.
Fixing.
--
KennethLavrsen - 06 Jan 2009