C Programming: The standard library string functions

preview_player
Показать описание
An introduction to some of the more useful string-handling functions in the standard library.
Рекомендации по теме
Комментарии
Автор

I believe strdup and strndup are also worth mentioning here as well, and not just because they're easy to use, convenient, and safer than strcpy, but also because I believe they're on track to be included in the upcoming ISO C23 standard, in just about 9 months from now as well. They're already available presently in POSIX C, which pretty much includes every major platform except Microsoft, although in this particular case, even Microsoft includes these functions already, as well.

nunyobiznez
Автор

ARM is actually bi-endian and is capable of running in either big or little endian mode, though it's generally used in little endian. RISC-V is also bi-endian, as well.

As a side note, since big endian machines have become somewhat rare these days, I thought I'd also point out IBM PowerPC as another, slightly newer, big endian example. PowerPC was not only used by Apple, but also used in the Xbox 360 and Sony PS3, and it still has some niche use cases to this day. There's also the internet itself, as an odd example of big endianess.

I used to think little endian was backward, and I could never understand why anyone would ever use it, until I started doing manual math operations in assembly, one byte at a time, where it's completely natural to use little endian only. It turned out, it was actually me and big endian that were backward, from the machine's perspective. After that, it made perfect sense, and it's actually surprising to me now, that there were ever any big endian machines at all.

nunyobiznez