On Sat, 19 Jul 2003, Stephen Colebourne wrote:
> From: "Henri Yandell" <[EMAIL PROTECTED]> > > > Having just updated the whitespace processing, I now think that > isBlank() > > > should be fully Unicode compliant and trim using > Character.isWhitespace() > > > not String.trim(). > > > > So how is it different from StringUtils.isWhitespace? > > It isn't. My preference is now for > > isEmpty() - "" or null > isBlank() - whitespace only, "" or null Could just tell people to do isWhitespace && isEmpty ? :) > and maybe: > isEmptyTrimmed() - trim() then "" or null I'm not sure there's any need for this. I wonder how much of the chars less than 32 count as whitespace? But it seems that isWhitespace is for most people's usage a superset of isEmptyTrimmed. > (plus isNotEmpty, isNotBlank, isEmptyNN, isBlankNN) Still hard to decide how far to go with all these. isEmptyNN is a single-atom method. isNotEmpty just replaces a ! sign etc etc. Does anyone actually want isEmptyNN, or is it just that people are unhappy with the null-handling in StringUtils? In which case I think the NN is the wrong solution, we need to be thinking about an ability to create a StringUtils with a strategy or having an underlying hidden class and 3 facade's for the different strategies. All 3.0. I think removing the trim from isEmpty is good, it's not expected by users. I think the isEmpty-w/ trim people can just use isWhitespace [we can javadoc them over]. Sorry to take so while to wake up on this, Hen --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
