Provided by: manpages-es-dev_4.13-4_all
NOMBRE
strsep - extrae un elemento de una cadena
SINOPSIS
#include <string.h> char *strsep(char **pcadena, const char *delim); Requisitos de Macros de Prueba de Características para glibc (véase feature_test_macros(7)): strsep(): Since glibc 2.19: _DEFAULT_SOURCE Glibc 2.19 and earlier: _BSD_SOURCE
DESCRIPCIÓN
If *stringp is NULL, the strsep() function returns NULL and does nothing else. Otherwise, this function finds the first token in the string *stringp, that is delimited by one of the bytes in the string delim. This token is terminated by overwriting the delimiter with a null byte ('\0'), and *stringp is updated to point past the token. In case no delimiter was found, the token is taken to be the entire string *stringp, and *stringp is made NULL.
VALOR DEVUELTO
La función strsep() devuelve un puntero al elemento, esto es, devuelve el valor original de *pcadena.
ATRIBUTOS
Para obtener una explicación de los términos usados en esta sección, véase attributes(7). ┌─────────┬────────────────────┬───────────────────┐ │Interfaz │ Atributo │ Valor │ ├─────────┼────────────────────┼───────────────────┤ │strsep() │ Seguridad del hilo │ Multi-hilo seguro │ └─────────┴────────────────────┴───────────────────┘
CONFORME A
4.4BSD.
NOTAS
La función strsep() se introdujo como para sustituir a strtok(3), ya que esta última no puede manejar campos vacíos. Sin embargo, strtok(3) es conforme al C89/C99, y por lo tanto es más portable.
ERRORES
Be cautious when using this function. If you do use it, note that: * This function modifies its first argument. * This function cannot be used on constant strings. * La identidad del carácter delimitador se pierde.
VÉASE TAMBIÉN
index(3), memchr(3), rindex(3), strchr(3), string(3), strpbrk(3), strspn(3), strstr(3), strtok(3)
COLOFÓN
Esta página es parte de la versión 5.10 del proyecto Linux man-pages. Puede encontrar una descripción del proyecto, información sobre cómo informar errores y la última versión de esta página en https://www.kernel.org/doc/man-pages/.
TRADUCCIÓN
La traducción al español de esta página del manual fue creada por Urko Lusa <ulusa@lacueva.ddns.org> Esta traducción es documentación libre; lea la GNU General Public License Version 3 ⟨https://www.gnu.org/licenses/gpl-3.0.html⟩ o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a debian-l10n-spanish@lists.debian.org ⟨⟩.