Replace Function does not work properly in
SpreadSheetPlugin.
Trying to replace the character
0
within a text string, using the replace funtion of the
SpreadSheetPlugin does not work.
For example:
%CALC{"$REPLACE(Sebastian, 2, 1, .)"}%
results in:
S.bastian
So this works fine.
2nd example:
%CALC{"$REPLACE(11xxx, 2, 1, .)"}%
results in:
1.xxx
So this works fine, too.
But:
%CALC{"$REPLACE(10xxx, 2, 1, .)"}%
results in:
1.xxx
So here it does
not work.
--
TWiki:Main/SebastianKlus - 24 Mar 2008
Sebastian is right. The 0 doesn't get replaced if the num parameter is 1. Strange effect. I don't understand why the substr( ) code in
SpreadSheetPlugin/Calc.pm does even work. Peter will know.
--
TWiki:Main.FranzJosefGigler - 25 Mar 2008
Found the support topic
TWiki:Support.UnableToForceLinkNameTo0 which shows similar effect in totally different context. 0 seems to be somehow problematic.
--
TWiki:Main.FranzJosefGigler - 14 Apr 2008
Bug confirmed, needs to be fixed. $FIND, $SEARCH and $SUBSTITUTE seem to have the same bug.
--
TWiki:Main.PeterThoeny - 16 Apr 2008
Fixed in
TWikirev:17894 and
TWikirev:17895
--
TWiki:Main.PeterThoeny - 25 Mar 2009
Closing this after TWiki 4.3.0 release
--
TWiki:Main.SopanShewale - 06 Apr 2009