## twiki-dev

 [TWiki-Dev] [SVN] PeterThoeny r23047 - in twiki/branches/TWikiRelease05x01/SpreadSheetPlugin/lib/TWiki/Plugins: . SpreadSheetPlugin From: - 2012-06-30 02:04:58 ```Author: PeterThoeny Date: 2012-06-29 21:04:51 -0500 (Fri, 29 Jun 2012) New Revision: 23047 Trac url: http://develop.twiki.org/trac/changeset/23047 Modified: twiki/branches/TWikiRelease05x01/SpreadSheetPlugin/lib/TWiki/Plugins/SpreadSheetPlugin.pm twiki/branches/TWikiRelease05x01/SpreadSheetPlugin/lib/TWiki/Plugins/SpreadSheetPlugin/Calc.pm Log: Item6897: New functions ISDIGIT(), ISLOWER(), ISUPPER(), ISWIKIWORD() Modified: twiki/branches/TWikiRelease05x01/SpreadSheetPlugin/lib/TWiki/Plugins/SpreadSheetPlugin/Calc.pm =================================================================== --- twiki/branches/TWikiRelease05x01/SpreadSheetPlugin/lib/TWiki/Plugins/SpreadSheetPlugin/Calc.pm 2012-06-30 02:04:10 UTC (rev 23046) +++ twiki/branches/TWikiRelease05x01/SpreadSheetPlugin/lib/TWiki/Plugins/SpreadSheetPlugin/Calc.pm 2012-06-30 02:04:51 UTC (rev 23047) @@ -453,6 +453,23 @@ \$result .= \$res; } + } elsif( \$theFunc eq "ISUPPER" ) { + my \$regex = (\$TWiki::regex{upperAlpha}) ? qr/[\$TWiki::regex{upperAlpha}]+/o : '[[:upper:]]+'; + \$result = ( \$theAttr =~ m/^\$regex\$/o ) ? 1 : 0; + + } elsif( \$theFunc eq "ISLOWER" ) { + my \$regex = (\$TWiki::regex{lowerAlpha}) ? qr/[\$TWiki::regex{lowerAlpha}]+/o : '[[:lower:]]+'; + \$result = ( \$theAttr =~ m/^\$regex\$/o ) ? 1 : 0; + + } elsif( \$theFunc eq "ISDIGIT" ) { + my \$regex = (\$TWiki::regex{numeric}) ? qr/[\$TWiki::regex{numeric}]+/o : '[[:digit:]]+'; + \$result = ( \$theAttr =~ m/^\$regex\$/o ) ? 1 : 0; + + } elsif( \$theFunc eq "ISWIKIWORD" ) { + my \$regex = (\$TWiki::regex{wikiWordRegex}) ? \$TWiki::regex{wikiWordRegex} : + '[[:upper:]]+[[:lower:][:digit:]]+[[:upper:]]+[[:alpha:][:digit:]]*'; + \$result = ( \$theAttr =~ m/^\$regex\$/o ) ? 1 : 0; + } elsif( \$theFunc eq "UPPER" ) { \$result = uc( \$theAttr ); Modified: twiki/branches/TWikiRelease05x01/SpreadSheetPlugin/lib/TWiki/Plugins/SpreadSheetPlugin.pm =================================================================== --- twiki/branches/TWikiRelease05x01/SpreadSheetPlugin/lib/TWiki/Plugins/SpreadSheetPlugin.pm 2012-06-30 02:04:10 UTC (rev 23046) +++ twiki/branches/TWikiRelease05x01/SpreadSheetPlugin/lib/TWiki/Plugins/SpreadSheetPlugin.pm 2012-06-30 02:04:51 UTC (rev 23047) @@ -25,7 +25,7 @@ # ========================= our \$VERSION = '\$Rev\$'; -our \$RELEASE = '2012-04-04'; +our \$RELEASE = '2012-06-29'; our \$web; our \$topic; ```