никакая ручная запись для string.h

Я пытаюсь найти ручную запись для "string.h", у меня есть GNU gcc установленный. Но когда я ввел man string.h, это показывает мне no manual entry for string.h, Я не уверен, что пошло не так, как надо? Кто-либо может помочь мне?Спасибо!

1
задан 24 January 2017 в 03:55

1 ответ

Используя man man, мы видим, что страницы руководства попадают в следующие разделы:

   1   Executable programs or shell commands
   2   System calls (functions provided by the kernel)
   3   Library calls (functions within program libraries)
   4   Special files (usually found in /dev)
   5   File formats and conventions eg /etc/passwd
   6   Games
   7   Miscellaneous  (including  macro  packages  and  conventions), e.g.
       man(7), groff(7)
   8   System administration commands (usually only for root)
   9   Kernel routines [Non standard]

Обратите внимание, что Раздел 3 для functions within program libraries т.е. это - обычно отдельные функции, которые документируются, а не определенные заголовочные файлы. Так, например, man strncpy:

STRCPY(3)                  Linux Programmer's Manual                 STRCPY(3)

NAME
       strcpy, strncpy - copy a string

SYNOPSIS
       #include <string.h>

       char *strcpy(char *dest, const char *src);

       char *strncpy(char *dest, const char *src, size_t n);

DESCRIPTION
       The  strcpy()  function  copies the string pointed to by src, including
       the terminating null byte ('\0'), to the buffer  pointed  to  by  dest.
       The  strings  may  not overlap, and the destination string dest must be
       large enough to receive the copy.  Beware  of  buffer  overruns!   (See
       BUGS.)
etc.

В этом случае существует обзор в man string (как существует для stdio - но не, по-видимому, для stdlib)

STRING(3)                  Linux Programmer's Manual                 STRING(3)

NAME
       stpcpy,  strcasecmp,  strcat, strchr, strcmp, strcoll, strcpy, strcspn,
       strdup, strfry, strlen, strncat, strncmp, strncpy,  strncasecmp,  strp‐
       brk,  strrchr, strsep, strspn, strstr, strtok, strxfrm, index, rindex -
       string operations

SYNOPSIS
       #include <strings.h>
etc.

NB, который не будет перепутан с man strings который документирует strings утилита командной строки от раздела (1) из каталога.

6
ответ дан 3 December 2019 в 06:31

Другие вопросы по тегам:

Похожие вопросы: