Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

string.h 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef _STRING_H
  2. #define _STRING_H
  3. /** @file
  4. *
  5. * String functions
  6. *
  7. */
  8. FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  9. #include <stddef.h>
  10. extern void * generic_memset ( void *dest, int character,
  11. size_t len ) __nonnull;
  12. extern void * generic_memcpy ( void *dest, const void *src,
  13. size_t len ) __nonnull;
  14. extern void * generic_memmove ( void *dest, const void *src,
  15. size_t len ) __nonnull;
  16. #include <bits/string.h>
  17. /* Architecture-specific code is expected to provide these functions,
  18. * but may instead explicitly choose to use the generic versions.
  19. */
  20. void * memset ( void *dest, int character, size_t len ) __nonnull;
  21. void * memcpy ( void *dest, const void *src, size_t len ) __nonnull;
  22. void * memmove ( void *dest, const void *src, size_t len ) __nonnull;
  23. extern int __pure memcmp ( const void *first, const void *second,
  24. size_t len ) __nonnull;
  25. extern void * __pure memchr ( const void *src, int character,
  26. size_t len ) __nonnull;
  27. extern void * memswap ( void *dest, void *src, size_t len ) __nonnull;
  28. extern int __pure strcmp ( const char *first, const char *second ) __nonnull;
  29. extern int __pure strncmp ( const char *first, const char *second,
  30. size_t max ) __nonnull;
  31. extern size_t __pure strlen ( const char *src ) __nonnull;
  32. extern size_t __pure strnlen ( const char *src, size_t max ) __nonnull;
  33. extern char * __pure strchr ( const char *src, int character ) __nonnull;
  34. extern char * __pure strrchr ( const char *src, int character ) __nonnull;
  35. extern char * __pure strstr ( const char *haystack,
  36. const char *needle ) __nonnull;
  37. extern char * strcpy ( char *dest, const char *src ) __nonnull;
  38. extern char * strncpy ( char *dest, const char *src, size_t max ) __nonnull;
  39. extern char * strcat ( char *dest, const char *src ) __nonnull;
  40. extern char * __malloc strdup ( const char *src ) __nonnull;
  41. extern char * __malloc strndup ( const char *src, size_t max ) __nonnull;
  42. extern char * __pure strpbrk ( const char *string,
  43. const char *delim ) __nonnull;
  44. extern char * strsep ( char **string, const char *delim ) __nonnull;
  45. extern char * __pure strerror ( int errno );
  46. #endif /* _STRING_H */