Created
April 19, 2015 09:33
-
-
Save jiunbae/791b33dd9cdd9fbbf507 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char * strmid(register char * string, register int start, register int len) | |
{ | |
int string_len = strlen(string) > len ? len : strlen(string); | |
register char * str = (char *)calloc(sizeof(char), string_len + sizeof(int)); | |
for (int i = start; i <= string_len; i++) | |
str[i - start] = string[i]; | |
return str; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment