My Project
Loading...
Searching...
No Matches
C_lib
include_printf
az_strsub.c
Go to the documentation of this file.
1
// kernel_lib_printf_functions
2
/*
3
* Kernel Lib Printf Functions
4
*
5
* Maintainer: Park Jiwoo
6
*
7
* Copyright (C) 2024 Park-Jiwoo
8
*
9
*/
10
#include "
kernel_pr_he.h
"
11
12
char
*
az_strsub
(
char
const
*s,
unsigned
int
start,
size_t
len)
13
{
14
size_t
i;
15
char
*tmp;
16
17
i = 0;
18
tmp =
az_memalloc
(len + 1);
19
20
if
(tmp == NULL)
21
return
(NULL);
22
23
while
(i < len)
24
{
25
tmp[i] = s[start + i];
26
i++;
27
}
28
29
tmp[i] =
'\0'
;
30
return
(tmp);
31
}
az_memalloc
void * az_memalloc(size_t size)
Definition
az_memalloc.c:13
az_strsub
char * az_strsub(char const *s, unsigned int start, size_t len)
Definition
az_strsub.c:12
kernel_pr_he.h
Generated by
1.12.0