-
mode parameter in console.strlen()
From
Nightfox@VERT/DIGDIST to
Digital Man on Thu Jun 23 09:21:55 2022
Hi DM,ããI'm curious what the mode parameter is for in console.strlen()? jsobjs.html says mode is an optional parameter, but it doesn't say what it's for. When looking at the mode values in sbbsdefs.js, it seems some don't make sense for getting string length (such as P_NOABORT, P_NOABORT, etc.)..ãAlso, P_NOATCODES might make sense, but I'd think console.strlen() already would not be counting at-codes as part of string length..?ããNightfoxãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã
-
From
Digital Man@VERT to
Nightfox on Thu Jun 23 10:44:11 2022
Re: mode parameter in console.strlen()ã By: Nightfox to Digital Man on Thu Jun 23 2022 09:21 amãã > Hi DM,ã >ã > I'm curious what the mode parameter is for in console.strlen()?ããToday, it's only use is to control whether the passed string is expected to be UTF-8 encoded or not.ãã > jsobjs.htmlã > says mode is an optional parameter, but it doesn't say what it's for. Whenã > looking at the mode values in sbbsdefs.js, it seems some don't make senseã > for getting string length (such as P_NOABORT, P_NOABORT, etc.)..ã > Also, P_NOATCODES might make sense, but I'd think console.strlen() alreadyã > would not be counting at-codes as part of string length..?ããIt *does* count at-codes as part of the string. Passing P_NOATCODES would have no effect.ããThe only checked/used P_* (print) mode flag in console.strlen() is P_UTF8.ã-- ã digital man (rob)ããSynchronet "Real Fact" #89:ãRob played drums on the LP "Weedpuller" available for digital purchase/streamãNorco, CA WX: 86.3øF, 39.0% humidity, 1 mph E wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Nightfox@VERT/DIGDIST to
Digital Man on Thu Jun 23 11:43:14 2022
Re: mode parameter in console.strlen()ã By: Digital Man to Nightfox on Thu Jun 23 2022 10:44 amãã >> etc.).. Also, P_NOATCODES might make sense, but I'd thinkã >> console.strlen() already would not be counting at-codes as part ofã >> string length..? ãã DM> It *does* count at-codes as part of the string. Passing P_NOATCODES wouldã DM> have no effect. ããI was thinking attribute codes when I wrote that.. :P It makes sense that it would count at-codes as part of the string.ãã DM> The only checked/used P_* (print) mode flag in console.strlen() is P_UTF8.ããI see. Thanks.ããNightfoxãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã