You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Er...@swissinfo.ch on 2004/12/14 11:41:28 UTC

[String] Chomp, prechomp: Behavior changed? Documentation?

Hi all

I recently installed the version 1.1 of the String Tag Library. After some
complaints from our webmasters I realized that the behavior of the String
tag library had changed for the chomp "family" of tags when the character
isn't found. But we can adapt to it, since it wasn't defined in the first
place.
However, I do think that the documentation on
http://jakarta.apache.org/taglibs/doc/string-doc/string-1.1.0/index.html
should be more precise and show exactly what the expected output is for
chomp, getChomp, prechomp, getPrechomp. It should also show what is returned
when the character is not found. The string-examples.war is better in that
respect.

To get to the point:

getChomp: " Get everything after a specified delimiter. Returns the
delimiter as well."  If this were the case, <str:getChomp
delimiter="T">TestTeee</str:getChomp> would return 'Teee', but it returns
'eee'. I guess the documentation should be updated?

getPrechomp: " Get everything up until a specific delimiter. Returns the
delimiter as well."  Same here, for <str:getPrechomp
delimiter="t">TestTeee</str:getPrechomp> according to the documentation
'Test' would be returned, but in fact 'Tes' is returned.

Perhaps my notion of "Returns the delimiter as well" is wrong, but I would
expect the character to be included.

Best regards,
Eric

swissinfo/Swiss Radio International
Eric Lewis
IT Application Development
Giacomettistrasse 1
CH-3000 Berne 15

Phone: 	++41 31 350 95 42
Fax: 	++41 31 350 99 40
mailto:eric.lewis@swissinfo.ch

Switzerland is everywhere. Stay connected!
http://www.swissinfo.org 
http://mobile.swissinfo.org
http:/wap.swissinfo.org

SRG SSR idée suisse



---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: [String] Chomp, prechomp: Behavior changed? Documentation?

Posted by Felipe Leme <ja...@felipeal.net>.
Hi Eric,


On Tue, 2004-12-14 at 08:41, Eric.Lewis@swissinfo.ch wrote:

> complaints from our webmasters I realized that the behavior of the String
> tag library had changed for the chomp "family" of tags when the character
> isn't found. But we can adapt to it, since it wasn't defined in the first

I believe the change was documented in the release notes:

http://jakarta.apache.org/taglibs/doc/string-doc/string-1.1.0/changes.html
http://issues.apache.org/bugzilla/show_bug.cgi?id=25136

> However, I do think that the documentation on
> http://jakarta.apache.org/taglibs/doc/string-doc/string-1.1.0/index.html
> should be more precise and show exactly what the expected output is for

Could you please open a new issue on bugzilla and  provide a patch with
your changes?

-- Felipe



---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org