www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - function escape

reply JapA <JapA_member pathlink.com> writes:
char[] function(char[]) escape and unescape

"escaped\tstring\n"
-->"escaped\\tstring\\n"
Jan 13 2005
parent reply rev <rev_member pathlink.com> writes:
In article <cs67ip$2rnk$1 digitaldaemon.com>, JapA says...
char[] function(char[]) escape and unescape

"escaped\tstring\n"
-->"escaped\\tstring\\n"
Maybe I'm just me incable of understanding "programspeak", but what exactly are you trying to say?
Jan 13 2005
next sibling parent reply "Simon Buchan" <buchan.home ihug.co.nz> writes:
On Fri, 14 Jan 2005 04:48:42 +0000 (UTC), rev <rev_member pathlink.com>  
wrote:

 In article <cs67ip$2rnk$1 digitaldaemon.com>, JapA says...
 char[] function(char[]) escape and unescape

 "escaped\tstring\n"
 -->"escaped\\tstring\\n"
Maybe I'm just me incable of understanding "programspeak", but what exactly are you trying to say?
I'm guessing one of: 1) a function is escaping a string he didn't want it to (unlikely) 2) he wants a function that will (use `strings like this` (non-shifted ~, under esc) for completley literal string, I would love to see the function that does it the other way around) 3) He's a monkey that randomly typed something -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Jan 13 2005
next sibling parent "Charles" <no email.com> writes:
lol

"Simon Buchan" <buchan.home ihug.co.nz> wrote in message
news:opskk1bud6stcuho simon...
 On Fri, 14 Jan 2005 04:48:42 +0000 (UTC), rev <rev_member pathlink.com>
 wrote:

 In article <cs67ip$2rnk$1 digitaldaemon.com>, JapA says...
 char[] function(char[]) escape and unescape

 "escaped\tstring\n"
 -->"escaped\\tstring\\n"
Maybe I'm just me incable of understanding "programspeak", but what exactly are you trying to say?
I'm guessing one of: 1) a function is escaping a string he didn't want it to (unlikely) 2) he wants a function that will (use `strings like this` (non-shifted ~, under esc) for completley literal string, I would love to see the
function
   that does it the other way around)
 3) He's a monkey that randomly typed something

 --
 Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Jan 14 2005
prev sibling parent reply Paul Bonser <misterpib gmail.com> writes:
Simon Buchan wrote:
 On Fri, 14 Jan 2005 04:48:42 +0000 (UTC), rev <rev_member pathlink.com>  
 wrote:
 
 In article <cs67ip$2rnk$1 digitaldaemon.com>, JapA says...

 char[] function(char[]) escape and unescape

 "escaped\tstring\n"
 -->"escaped\\tstring\\n"
Maybe I'm just me incable of understanding "programspeak", but what exactly are you trying to say?
I'm guessing one of: 1) a function is escaping a string he didn't want it to (unlikely) 2) he wants a function that will (use `strings like this` (non-shifted ~, under esc) for completley literal string, I would love to see the function that does it the other way around) 3) He's a monkey that randomly typed something
I'm gonna have to go with 3. :P Actually, maybe he was asking was for the ability to have a certain function called when an escape sequence is used in a string? Perhaps we're all sexist for assuming it's a he? Or perhaps the English language is to blame for not having gender-free pronouns... Yes, I indeed now believe that it was really just an indirect criticism of the English language by example... Okay, enough crack for me... -Paul B.
Jan 14 2005
parent reply pragma <pragma_member pathlink.com> writes:
In article <cs9904$1kc$1 digitaldaemon.com>, Paul Bonser says...
Or perhaps the English language is to blame for not having gender-free 
pronouns...
[Way offtopic here, and just for fun...] Well, we do have "it" and "its", but for some reason they're concidered "rude" (almost derogatory) when used in reference to a person. At best "it" would accurately describe a hemaphrodite, which would be exceedingly unlikely to be accurate since among what few hemaphrodites exist, most proclaim a gender to avoid such problems anyway. The closest "polite" form we have is "he/she" which is, sadly, a lingustic kludge at best. And don't even get me started on the "alternating pronoun gender every other paragraph" thing; man, that stuff gets confusing. :) (I wonder if somewhere there's a newsgroup full of english teachers, journalists and Phd's attempting to develop an evolved/improved English-like language ... hrm) As to the original content: I haven't a clue as to what that's about. Pragma - ericanderton at yahoo
Jan 14 2005
next sibling parent reply Paul Bonser <misterpib gmail.com> writes:
pragma wrote:
 In article <cs9904$1kc$1 digitaldaemon.com>, Paul Bonser says...
 
Or perhaps the English language is to blame for not having gender-free 
pronouns...
[Way offtopic here, and just for fun...] Well, we do have "it" and "its", but for some reason they're concidered "rude" (almost derogatory) when used in reference to a person. At best "it" would accurately describe a hemaphrodite, which would be exceedingly unlikely to be accurate since among what few hemaphrodites exist, most proclaim a gender to avoid such problems anyway. The closest "polite" form we have is "he/she" which is, sadly, a lingustic kludge at best. And don't even get me started on the "alternating pronoun gender every other paragraph" thing; man, that stuff gets confusing. :) (I wonder if somewhere there's a newsgroup full of english teachers, journalists and Phd's attempting to develop an evolved/improved English-like language ... hrm) As to the original content: I haven't a clue as to what that's about. Pragma - ericanderton at yahoo
My English teacher in high school told me there are two standards for gender-free pronouns, both use by a few College professors. I wonder what kind of "English Standards Agency" there is or whatnot? I want to see the ANSI Recommendation for the English standard version 1.5 :) Okay, Sorry all, I'm done with this thread...maybe. -PIB.
Jan 14 2005
next sibling parent "Matthew" <admin.hat stlsoft.dot.org> writes:
"Paul Bonser" <misterpib gmail.com> wrote in message
news:cs9e3s$7nq$1 digitaldaemon.com...
 pragma wrote:
 In article <cs9904$1kc$1 digitaldaemon.com>, Paul Bonser says...

Or perhaps the English language is to blame for not having gender-free
pronouns...
[Way offtopic here, and just for fun...] Well, we do have "it" and "its", but for some reason they're concidered "rude" (almost derogatory) when used in reference to a person. At best "it" would accurately describe a hemaphrodite, which would be exceedingly unlikely to be accurate since among what few hemaphrodites exist, most proclaim a gender to avoid such problems anyway. The closest "polite" form we have is "he/she" which is, sadly, a lingustic kludge at best. And don't even get me started on the "alternating pronoun gender every other paragraph" thing; man, that stuff gets confusing. :) (I wonder if somewhere there's a newsgroup full of english teachers, journalists and Phd's attempting to develop an evolved/improved English-like language ... hrm) As to the original content: I haven't a clue as to what that's about. Pragma - ericanderton at yahoo
My English teacher in high school told me there are two standards for gender-free pronouns, both use by a few College professors.
and they are ?? I wonder
 what kind of "English Standards Agency" there is or whatnot? I want to see the
ANSI Recommendation for the English 
 standard version 1.5 :)

 Okay, Sorry all, I'm done with this thread...maybe.

 -PIB. 
Jan 26 2005
prev sibling parent Les De Ridder <les lesderid.net> writes:
On Tuesday, 26 May 2020 at 10:55:32 UTC, Miguel A. Pillar wrote:
 On Friday, 14 January 2005 at 21:38:05 UTC, Paul Bonser wrote:
 pragma wrote:
 My English teacher in high school told me there are two 
 standards for gender-free pronouns, both use by a few College 
 professors. I wonder what kind of "English Standards Agency" 
 there is or whatnot? I want to see the ANSI Recommendation for 
 the English standard version 1.5 :)
 -PIB.
I have always failed topic on pronouns. This has always caused me troubles when writing essays, I need to have my essays edited on https://www.achieveessays.com before final submission to my English teacher.
Is there a report spam button anywhere on forum.dlang.org?
May 26 2020
prev sibling parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
 The closest "polite" form we have is "he/she" which is, sadly, a lingustic
 kludge at best.
Around here, we say "they" for an indefinite third person. Something I also can't get my head around - spoken language has been around much longer than written language, yes? Then why are there two distinctly separate sets of rules for spoken and written English? Shouldn't the written language reflect the spoken? No, apparently not - we always have to use "one" in our papers, when no one says "one." Confusing.
Jan 14 2005
next sibling parent reply Paul Bonser <misterpib gmail.com> writes:
Jarrett Billingsley wrote:
The closest "polite" form we have is "he/she" which is, sadly, a lingustic
kludge at best.
Around here, we say "they" for an indefinite third person. Something I also can't get my head around - spoken language has been around much longer than written language, yes? Then why are there two distinctly separate sets of rules for spoken and written English? Shouldn't the written language reflect the spoken? No, apparently not - we always have to use "one" in our papers, when no one says "one." Confusing.
Okay, I lied about staying out of this topic, but I couldn't resist. The word "they" is plural, and therefore semantically wrong for this kind of use. I found some sites with some info on ones that seem almost suitable.. http://footnotes.jinkies.org.uk/pronouns.html http://www.aetherlumina.com/gnp/ Okay, I should leave this alone now :) -PIB
Jan 14 2005
parent reply "Simon Buchan" <buchan.home ihug.co.nz> writes:
On Fri, 14 Jan 2005 19:05:10 -0800, Paul Bonser <misterpib gmail.com>  
wrote:

 Jarrett Billingsley wrote:
 The closest "polite" form we have is "he/she" which is, sadly, a  
 lingustic
 kludge at best.
Around here, we say "they" for an indefinite third person. Something I also can't get my head around - spoken language has been around much longer than written language, yes? Then why are there two distinctly separate sets of rules for spoken and written English? Shouldn't the written language reflect the spoken? No, apparently not - we always have to use "one" in our papers, when no one says "one." Confusing.
Okay, I lied about staying out of this topic, but I couldn't resist. The word "they" is plural, and therefore semantically wrong for this kind of use. I found some sites with some info on ones that seem almost suitable.. http://footnotes.jinkies.org.uk/pronouns.html http://www.aetherlumina.com/gnp/ Okay, I should leave this alone now :) -PIB
Note also that from the 'orrible sexist market I currently see, men outnumber women by at LEAST 10 : 1 in programming. One is a little to vauge, not to mention a bit Brittish Upper-Class™ (Can't beleive I remember the key-stroke for that). He/She is terrible. (I would probbably rather be called She that He/She, anyway) Alternating is asking for trouble. They, as said, is plural. It, likewise, is considered demeaning. As a side note, the only acceptable genderless singular pronoun for a sophont (The more PC term for sentient, cause animals feel too <roll eyes/>) I've heard is Ve, which is in fact for beings where the idea of gender are irrelevant, like programs. Go figure. Don't lose hope, though, with any luck, the Americans will totally factor out gender from the language, and we already got rid of (most) gendered inanimite objects, as in French. (Other 'Romance' languages, too? (As in, derived from Roman, not because they're romantic :P)) BTW, sorry if I come across as trying to hand out knowledge from on high... guess it's just natural when your just so damn smart ];) -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Jan 14 2005
next sibling parent reply "Nick Sabalausky" <z a.a> writes:
I found it funny in Spanish class that the spanish word for "mustache" was 
considered female :).

As for an ungendered pronoun, I like to just take the male pronouns as being 
androgonus.  I think there's already precidents:
- Nobody says "actress" anymore. They're all just "actors" now.
- Not a lot of people use the pc versions of many other job titles like 
"garbagemen", "firemen".
- "One small step for man, one giant leap for mankind" was probably not 
referring to males alone.

"Simon Buchan" <buchan.home ihug.co.nz> wrote in message 
news:opskmtoqwestcuho simon...
 On Fri, 14 Jan 2005 19:05:10 -0800, Paul Bonser <misterpib gmail.com> 
 wrote:

 Jarrett Billingsley wrote:
 The closest "polite" form we have is "he/she" which is, sadly, a 
 lingustic
 kludge at best.
Around here, we say "they" for an indefinite third person. Something I also can't get my head around - spoken language has been around much longer than written language, yes? Then why are there two distinctly separate sets of rules for spoken and written English? Shouldn't the written language reflect the spoken? No, apparently not - we always have to use "one" in our papers, when no one says "one." Confusing.
Okay, I lied about staying out of this topic, but I couldn't resist. The word "they" is plural, and therefore semantically wrong for this kind of use. I found some sites with some info on ones that seem almost suitable.. http://footnotes.jinkies.org.uk/pronouns.html http://www.aetherlumina.com/gnp/ Okay, I should leave this alone now :) -PIB
Note also that from the 'orrible sexist market I currently see, men outnumber women by at LEAST 10 : 1 in programming. One is a little to vauge, not to mention a bit Brittish Upper-ClassT (Can't beleive I remember the key-stroke for that). He/She is terrible. (I would probbably rather be called She that He/She, anyway) Alternating is asking for trouble. They, as said, is plural. It, likewise, is considered demeaning. As a side note, the only acceptable genderless singular pronoun for a sophont (The more PC term for sentient, cause animals feel too <roll eyes/>) I've heard is Ve, which is in fact for beings where the idea of gender are irrelevant, like programs. Go figure. Don't lose hope, though, with any luck, the Americans will totally factor out gender from the language, and we already got rid of (most) gendered inanimite objects, as in French. (Other 'Romance' languages, too? (As in, derived from Roman, not because they're romantic :P)) BTW, sorry if I come across as trying to hand out knowledge from on high... guess it's just natural when your just so damn smart ];) -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Jan 15 2005
parent reply "Carlos Santander B." <csantander619 gmail.com> writes:
Nick Sabalausky wrote:
 I found it funny in Spanish class that the spanish word for "mustache" was 
 considered female :).
 
Sorry, dude, but "bigote" is male. (mustache is the hair that grows on the upper lip, right?). You must've been thinking about something else. _______________________ Carlos Santander Bernal
Jan 15 2005
parent reply "Nick Sabalausky" <z a.a> writes:
Hmm, maybe it was "beard". Either that or my teacher just didn't know what 
she was talking about - which is entirely possible.

"Carlos Santander B." <csantander619 gmail.com> wrote in message 
news:csc6kb$7nt$1 digitaldaemon.com...
 Nick Sabalausky wrote:
 I found it funny in Spanish class that the spanish word for "mustache" 
 was considered female :).
Sorry, dude, but "bigote" is male. (mustache is the hair that grows on the upper lip, right?). You must've been thinking about something else. _______________________ Carlos Santander Bernal
Jan 16 2005
parent reply "Carlos Santander B." <csantander619 gmail.com> writes:
Nick Sabalausky wrote:
 Hmm, maybe it was "beard". Either that or my teacher just didn't know what 
 she was talking about - which is entirely possible.
 
Now you're correct: "barba" is female. _______________________ Carlos Santander Bernal
Jan 16 2005
next sibling parent Carotinho <carotinobg yahoo.it> writes:
Carlos Santander B. wrote:

 Nick Sabalausky wrote:
 Hmm, maybe it was "beard". Either that or my teacher just didn't know
 what she was talking about - which is entirely possible.
 
Now you're correct: "barba" is female.
Just to add something to this linguistic thread: barba it's the same in Italian, name and gender... and "baffi" is male gender:) Byez:) Carotinho
Jan 16 2005
prev sibling parent "Matthew" <admin.hat stlsoft.dot.org> writes:
"Carlos Santander B." <csantander619 gmail.com> wrote in message
news:cse781$27vm$1 digitaldaemon.com...
 Nick Sabalausky wrote:
 Hmm, maybe it was "beard". Either that or my teacher just didn't know what she
was talking about - which is entirely 
 possible.
Now you're correct: "barba" is female.
That's even funnier than moustache!
Jan 26 2005
prev sibling parent "Matthew" <admin.hat stlsoft.dot.org> writes:
 Don't lose hope, though, with any luck, the Americans will totally factor  out
 gender from the language,
along with 'election' and 'environment' ?? <CG> Ok, fire away ... ... but before you do, note that, being a UK and Australian citizen, I acknowledge that our political/cultural/social/environmental systems are just about as f'ed up as that of the US. It's just that a lot fewer people care (~80 million, as opposed to ~ 6.2 billion). Ain't the world turning out peachy? :-( Matthew
Jan 26 2005
prev sibling parent "Matthew" <admin.hat stlsoft.dot.org> writes:
"Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote in message
news:cs9v4m$pc8$1 digitaldaemon.com...
 The closest "polite" form we have is "he/she" which is, sadly, a lingustic
 kludge at best.
Around here, we say "they" for an indefinite third person. Something I also can't get my head around - spoken language has been around much longer than written language, yes? Then why are there two distinctly separate sets of rules for spoken and written English? Shouldn't the written language reflect the spoken? No, apparently not - we always have to use "one" in our papers, when no one says "one." Confusing.
I say 'one'. But, since I live in Australia, I get a _lot_ of strange looks. :-)
Jan 26 2005
prev sibling parent reply "Unknown W. Brackets" <unknown simplemachines.org> writes:
I'll take a stab and guess he or she is looking for functions which 
emulate the addslashes and stripslashes functions in PHP.  Example:

echo addslashes("don't");
 don\'t
echo stripslashes("don\\'t");
 don't
Please note that these are *runtime* functions, nothing like the functionality of backticks in D. The main use for this would be, I suppose, SQL (as in PHP.) For example: char[] querystring = " SELECT column FROM table WHERE othercolumn = '" ~ std.string.escape(value) ~ "' LIMIT 1"; I'm no oracle though, so I could be wrong - this person *could* just be a monkey, I suppose, as suggested by Simon Buchan. But, I'm guessing not - mostly because I don't think the typewriters they use have brackets. I'm probably wrong about that, though. -[Unknown] -------- Original Message --------
 In article <cs67ip$2rnk$1 digitaldaemon.com>, JapA says...
 
char[] function(char[]) escape and unescape

"escaped\tstring\n"
-->"escaped\\tstring\\n"
Maybe I'm just me incable of understanding "programspeak", but what exactly are you trying to say?
Jan 15 2005
parent reply Paul Bonser <misterpib gmail.com> writes:
Unknown W. Brackets wrote:
 I'll take a stab and guess he or she is looking for functions which 
 emulate the addslashes and stripslashes functions in PHP.  Example:
 
 echo addslashes("don't");
  > don\'t
 
 echo stripslashes("don\\'t");
  > don't
Ahah! I bet that that's what he was saying...of course, he'll probably never confirm it now that we've most likely embarrassed him away from the board, you think? -PIB
Jan 15 2005
parent reply "Unknown W. Brackets" <unknown simplemachines.org> writes:
I'm afraid that's probably so, although I meant no mal-intent and I 
don't think he did much wrong, except maybe be a bit vague - possibly 
not a primary English speaker.

Oh well.  If you're reading this, don't worry, no big deal about 
verbosity in my book.

-[Unknown]

 Ahah! I bet that that's what he was saying...of course, he'll probably 
 never confirm it now that we've most likely embarrassed him away from 
 the board, you think?
 
 -PIB
Jan 16 2005
parent Mr. Monkey <Mr._member pathlink.com> writes:
I'm sorry for vagueness.
//How about this?
char[] quote(char[] s,int style=0);
char[] unquote(char[] s,int style=0);

assert(
quote("Are\tyou\nmonkey?")=="\"Are\\tyou\\nmonkey?\"");
Jan 16 2005