What does each of the abbreviations / abbreviations of str function mean?

The C standard library string.hcontains several functions for managing strings, all of which begin with strand end with an abbreviation. Some of these abbreviations are obvious:

  • strlen line length
  • strcpy string copy
  • strcmp string comparison

Some of them are a little less clear:

  • strpbrk line break line?
  • strspn string ... spn?
  • strrchr string ... R char ??
  • strxfrm string ... um ... nevermind.

What does each abbreviation / abbreviation strfunction mean ?

+4
source share
1 answer
  • strlen - find the length of the string
  • strcpy - CoPY lines
  • strcmp - CoMPare strings
  • strrchr - Reverse CHaRacter search
  • strspn - SPaN
  • strxfrm - TRANS ( X) -FoRM
  • strpbrk - , BRoKen
+3

Source: https://habr.com/ru/post/1671424/


All Articles