L
lawrence.jones
Serve La said:I would be more interested in strpbrk and strrchr
Stir-pea-break or strip-break and stir-are-care.
-Larry Jones
I've never seen a sled catch fire before. -- Hobbes
Serve La said:I would be more interested in strpbrk and strrchr
i know what it does do but what does the name stand for?
My guess: `string pointer break',
<lame humour>
which is not to be confused with sprbrk (spring break).
Also, some commentators claim that strpbrk means
"[str]ing [p]ower inary [r]ead ac[k]nowledgment,"
but this is highly unlikely.
</lame humour>
I pronounce strcpy like this: strcpy
That is, "str" as in "string without the ing", and "cpy" as a hard c sound
followed by the "py" sound that you get in "copy". No "o" sound.
In other words, I pronounce it just as it is spelt. I concede that
introducing a short 'o' would do little or no damage to comprehension.
Richard Heathfield said:I pronounce strcpy like this: strcpy
That is, "str" as in "string without the ing", and "cpy" as a hard c sound
followed by the "py" sound that you get in "copy". No "o" sound.
You want to include a link to an audio file for that? I
personally often find it difficult to pronounce five consecutive
consonants.
Ben said:You want to include a link to an audio file for that? I
personally often find it difficult to pronounce five consecutive
consonants.
Richard Heathfield said:Thanks to the wonders of modern technology, you can hear me say "strcpy". So
can other people, but I can't address everyone by name.
http://www.rjgh.co.uk/me/strcpy.tar.gz (37618 bytes) contains a .wav file of
around 128KB. Insane, since it's only (slightly under) 6 seconds of audio.
Richard said:Well, "eighthly" has five consecutive consonants and isn't any bother to
pronounce.
Irrwahn said:Anyone ever heard about todays audio compression technology,
beyond gzip that is?
Ben Pfaff said:You want to include a link to an audio file for that? I
personally often find it difficult to pronounce five consecutive
consonants.
Richard Heathfield said:[...] so I am a little short on audio compression tools,
and had no particular desire to write my own for the sake of one sample.
Emmanuel Delahaye said:I French, we generally spell 'str' and prononce 'cpy' as 'copy', hence we say
"Ess Tai Er Copy".
Sometimes, we spell the whole:
"Ess Tai Er Sai Pai E-grek"
Serve La said:I would be more interested in strpbrk and strrchr
In certain contexts, 'r' is a vowel <g>.
Richard, can, if forced, pronounce strcpy without schwas.
ArWeGod said:Well, that the French for you. ;-)
Umm, I mean, very logical, of course.
I use stir-copy. But then I say "etc" is et-see.
MP3, you mean? Well, up until today I have /never/ encountered a need to
compress audio at home, so I am a little short on audio compression tools,
and had no particular desire to write my own for the sake of one sample.
In said:#include <stdio.h>
#include <string.h>
int
main(void)
{
char *s =
"H4sICJMmXj8AA3N0cmNweS53YXYAdVZLbyNFEPbekDjAT+CvcGAlrhxYENJK"
"qw1O4oxjx8+Mp9/dM3biVxJCyGpBgASI6x448DP4Mdyp6q7uaWdFtacf1dWP"
"qvqq2l98/vz5vx92Oi8+/fKzbn/yycedTucZlF8+6vjvWeeDztGryat/QEZL"
"U/OaG21Mw40yWlu1FE5YCV1lA8NJJy0WHMAQuMA3CnkoJR3XUmqupFBSSiGF"
"rgwXmhlolJIKOJILxpmsFDfSwSZScc00Y9ViPhvNqkavHQgYvqpgF87K2XxQ"
"nF/Z5l6Vk3Jg7s21nSi9kNWk7L+ut/L+7qKcj+aPd+z7AdtU2kyni5fFm2b5"
"OxvMp73HX8dvJ4M7UV1PpurkG/nj+M/vivH4WL6bPbijTb1YqsHyvPd1cyfe"
"2elwePTm5+qn/nTP7NVMm9Gw+/Jx9/DbZHzed3/Ih3K+5Y3ifDk2xflX9zfy"
"r6KSr7c/6FvO1typcskMW4xmL+zb0d8DtuzfrmyjbVOu5q5mS8HVfMqLxoib"
"sm50XavGaCu00Ggu+EDzhajAfmBYBRZV4BbF4EANBhVoUrCfEkKBNWFWoYzU"
"AoyPO2gJNRUNS7VEm4NHFC7FPnWgCzK4gedKL65DhRvnJZwTOtpLU+U/2koR"
"A/YUeFXP0n5nRUiQoREcdRACKxwBCSi+EqGCCSaYqnS1Kvn2Yj11TNqqnjux"
"4qYCASscIAbNIIzQAB8wh+QrVjPFYLUBH6gKeaA4FK658XdCWe6t4K+mtY5a"
"aO3VRzgbaBQaH/veforMJkDOGmetM9YY6yWlkdIAkgUcCBieA6odhAn6zdS1"
"tWgZvwEohtgHYgx/IliPXIU2kgECwTZhIGSwW5pTQYLGsFwEkWTfJJyAENbp"
"5GEVPaz1gYMDI1uokrMPhqGTA4TgcUBer6RWvH+8TnvTgGmRXVjmCj0hnz/A"
"ihr9ivhGzUy4OiQkY2ttJPjFWutdCV6yvgV/haHveT6QcxYLtEA19rx7rQlp"
"DR3sD8Ggk+g4VlVleXl5OZ/NJpPxaDQcDgbD/nlRFL2zXq93eto9/va4ixU0"
"UI67J93T494JzJydnvWKs6JfnPdhzcXFeDybzmaw16KsFpxhWIA2gCjj6ma5"
"hN9ytVphfUV0jb0VVJvNbou02e52u60vN7e3tzd7HO43++3eT6/X693uZrfH"
"eRLcbLGExZtroKtrvyecV7umwQObpobSQNvUNXQC1bWzwXgeNZCzJdpZy+Ru"
"QoEmInx68EgR3fkUKD4AVettEXJB+EQIBIJewD+hJ6IlolslduoSvDzRXiJk"
"mJbCxWK4tYvyQEqxFqMzlSgk3iOvAJ3LfYaj7Ba04u35nFMKDMPET028YtDZ"
"PxHZ+aQUb/ejXJprGSeTtmlb4qQmTLdrM3+I/9kxGTBFtzgwY7KwoEgPW+Yl"
"vgDpDYj2OJShmlHBn49I/GHxRI0nnmQYmaVFgXiaYlTAZnrKdMqRiXwCSdkD"
"00bIHqENRBzKLiGXUOrBSlNmoeySGv+etMnJpE7MVljwoCBDAzw1nESD2oXP"
"uhpjlz4kYEOF9eEd6XbxNuFFpLCksPaezLPzYWQcgiiijx96OAs8SVCIsZwD"
"kZwTPQy+A8dWyb/k6ujnCIXWvxRdPAuwg5IFT355elpzBdMzlr2i2ftFSad9"
"teOcel8+Sah2dd6TMXYy/NG/ggRClSHRswk7Ov0ty15eUuw/0GCFBv0LAAA=";
int i;
char *Base64 =
"ABCDEFGHIJKLMNOPQ"
"RSTUVWXYZabcdefgh"
"ijklmnopqrstuvwxy"
"z0123456789+/=";
unsigned char d[4];
for (; *s; s += 4) {
for (i = 0; i < 4; i++)
d = strchr(Base64, s) - Base64;
if (d[0] < 64 && d[1] < 64) {
putchar((d[0] & 63) << 2 | d[1] >> 4);
if (d[2] < 64) {
putchar((d[1] & 15) << 4 | d[2] >> 2);
if (d[3] < 64)
putchar((d[2] & 3) << 6 | d[3]);
}
}
}
return 0;
}
Tak-Shing
P.S. This is a ``legitimate'' C program and therefore on-topic.
1. It exceeds the C89 limit of 509 characters in a string literal
(after concatenation).
2. It outputs characters that do not belong to the basic execution
character set to a text stream:
undefined behaviour.
Tak-Shing Chan said:On 10 Sep 2003, Dan Pop wrote:
[snip]1. It exceeds the C89 limit of 509 characters in a string literal
(after concatenation).
But it does not exceed the C99 limit of 4095.
Tak-Shing Chan said:On 10 Sep 2003, Dan Pop wrote:
[snip]1. It exceeds the C89 limit of 509 characters in a string literal
(after concatenation).
But it does not exceed the C99 limit of 4095.
And, C99 is what defines C at this time, right?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.