Maurizio (et al) there is no scanf functionality currently available in any of the Java Libraries
Scanner methods comes close to implementing scanf but so does tokenizing an array of String constructors to append to StringBuffer either way *will probably work* Nota Bene: if you're suggesting your way is better than someone elses be prepared for the opportunity to prove what you originally promised thats the reason why i suggested IF you have a better way to implement scanf method..go ahead ...and code the method and display the code to the dev list so the rest of us so we can *learn* the implementation. Martin ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Sun, 13 Mar 2011 19:00:25 +0100 > Subject: Re: Just a stab in the dark > From: maurizio.cucchi...@gmail.com > To: user@struts.apache.org > CC: ahardy.str...@cyberspaceroad.com > > I'm sorry, but unfortunately I have any implementation and to be > frankly I don't understand why Marting thought so :). > Adam, again, why do you prefer scanf to scanner? > > > On 13 March 2011 15:53, Adam Hardy <ahardy.str...@cyberspaceroad.com> wrote: > > I actually hoped I would find it in commons lang already - I was only asking > > on the struts list because I know the user list here is so much more diverse > > and would more likely know if it existed already somewhere. > > > > Do you Maurizio already have a scanf implementation? Or am I misinterpreting > > Martin's message to you? > > > > I should think it's about a day's work, with tests, plus a bit of thought > > needs to go into the design to make the parsing of the pattern string > > cacheable. That's why I was hoping to avoid writing scanf from scratch. But > > it looks like I'll have to make do with a temporary fix using Scanner on > > just the bits I need right now. > > > > Maurizio Cucchiara on 13/03/11 09:52, wrote: > >> > >> I think that the right place for this kind of questions is apache commons > >> lang ml. > >> > >> Maurizio Cucchiara > >> > >> Il giorno 13/mar/2011 02.26, "Martin Gainty" <mgai...@hotmail.com> ha > >> scritto: > >>> > >>> you can use String constructor to construct what you need from any part > >>> of a previous String > >>> then use StringBuffer to concat the Strings together > >>> but Scanner will work too. > >>> > >>> Maurizio can you put a scanf method in StringTools that uses scanner to > >> > >> replicate scanf functionality and send it to d...@struts.apache.org? > >>> > >>> thanks, > >>> Martin > >>> > >>> > >>>> Date: Sat, 12 Mar 2011 17:16:44 +0100 > >>>> Subject: Re: RE: Just a stab in the dark > >>>> From: maurizio.cucchi...@gmail.com > >>>> To: user@struts.apache.org > >>>> > >>>> Why do you prefer scanf to scanner class? > >>>> I could be wrong, but I don't believe it is possible cause of the > >>>> immutability of the string class (you cannot pass a string object as > >>>> reference). > >>>> > >>>> Maurizio Cucchiara > >>>> > >>>> Il giorno 12/mar/2011 15.22, "Martin Gainty" <mgai...@hotmail.com> ha > >>>> scritto: > >>>> > >>>> havent seen scanf method in any of the Java classes > >>>> i welcome factoring a scanf method in > >>>> org.apache.struts2.convention.StringTools > >>>> > >>>> anyone ? > >>>> Martin > >>>> > >>>> > >>>>> Date: Sat, 12 Mar 2011 12:57:17 +0000 > >>>>> From: ahardy.str...@cyberspaceroad.com > >>>>> To: user@struts.apache.org > >>>>> Subject: Just a stab in the dark > >>>>> Hi List > >>>>> > >>>>> this is a bit OT but it's the weekend and I have a question which I am > >>>>> desperat... > >> > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > > -- > Maurizio Cucchiara > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org >