tgrekov-pipex
HIVE pipex May 2024
Loading...
Searching...
No Matches
ft_substr.c File Reference

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_substr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/25 16:35:17 by tgrekov #+# #+# */
/* Updated: 2023/11/09 20:54:14 by tgrekov ### ########.fr */
/* */
/* ************************************************************************** */

Definition in file ft_substr.c.

#include "libft.h"
Include dependency graph for ft_substr.c:

Go to the source code of this file.

Functions

char * ft_substr (char const *s, unsigned int start, size_t len)
 Allocates and returns a substring of s, starting at s + start, and ending no later than s + start + len.
 

Function Documentation

◆ ft_substr()

char * ft_substr ( char const *  s,
unsigned int  start,
size_t  len 
)

Allocates and returns a substring of s, starting at s + start, and ending no later than s + start + len.

Parameters
[in]sNull-terminated string to make a substring of
[in]startPosition from s at which to start
[in]lenMaximum length of the substring to make
Return values
char*Pointer to allocated null-terminated substring

Definition at line 32 of file ft_substr.c.

References ft_calloc(), ft_strlcpy(), and ft_strlen().

Here is the call graph for this function:
Here is the caller graph for this function: