Introduction
Introduction Statistics Contact Development Disclaimer Help
strecpy.c - 9base - revived minimalist port of Plan 9 userland to Unix
git clone git://git.suckless.org/9base
Log
Files
Refs
README
LICENSE
---
strecpy.c (208B)
---
1 #include <lib9.h>
2
3 char*
4 strecpy(char *to, char *e, char *from)
5 {
6 if(to >= e)
7 return to;
8 to = memccpy(to, from, '\0', e - to);
9 if(to == nil){
10 to = e - 1;
11 *to = '\0';
12 }else{
13 to--;
14 }
15 return to;
16 }
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.