strend.c (242B)
1 /* Copyright ©2008-2010 Kris Maglione <maglione.k at Gmail> 2 * See LICENSE file for license details. 3 */ 4 #include <string.h> 5 #include <stuff/util.h> 6 7 char* 8 strend(char *s, int n) { 9 int len; 10 11 len = strlen(s); 12 return s + max(0, len - n); 13 }