Re: file_area.dir objectã By: Tegularius to All on Mon Jul 13 2009 06:50 amãã > Re: file_area.dir objectã > By: Digital Man to Tegularius on Sat Jul 11 2009 00:09:49ã >ã > The little job is almost done. I've discovered that it is just a matterã > of assigning the desired internal code to bbs.curdir_code, i.e.:ã > bbs.curdir_code=newcodeã >ã > If newcode is valid, then the change is made; if not, it isn't. The caseã > (upper or lower) of newcode doesn't matter. However, the valueã > of bbs.curdir_code is reported all in lower-case.ã >ã > This brings up my remaining little question. I would like my .js toã > recognize whether the change of directory is successful by comparingã > newcode to bbs.curdir_code after an attempt to change it. However,ã > if the cases of the two strings don't match, the comparison returns false.ã > How do I change the case of a string to upper or lower? The guide mentionsã > toLowerCase and toUpperCase as methods of strings, but I can't make themã > work. Are they obsolete? Could someone give an example of the syntax?ããNo, they're not obsolete. What did you try?ããThere's an example here:ã
https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/String/tãoLowerCaseãã > Oh yes, one more question, about console.getstr. This takes a stringã > as an optional argument. What is the purpose of this argument?ããIt's the default value of the string (e.g. when used with the K_EDIT modeãflag).ãã > Itã > doesn't appear to be either the string variable to be assigned (whichã > is done via the returned value) or a prompt. Something needs to beã > there if one wants to use the other arguments, but I can't determineã > what it does.ããActually, unless you're using K_EDIT, you don't need to specify the string atãall. The method implementation is smart enough to know the difference betweenãnumbers (e.g. maxlen and mode arguments) and string arguments. Many of theãSynchronet JS methods are this way.ãã digital manããSnapple "Real Fact" #65:ãA one-day weather forecast requires about 10 billion math calculations.ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã