21 lines · 282 B · C
RawDownload
#include <u.h>#include <libc.h> char*utfecpy(char *to, char *e, char *from){	char *end; 	if(to >= e)		return to;	end = memccpy(to, from, '\0', e - to);	if(end == nil){		end = e;		while(end>to && (*--end&0xC0)==0x80)			;		*end = '\0';	}else{		end--;	}	return end;}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t