strlen + strncpy - strcpy
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@792 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		
							
								
								
									
										15
									
								
								lib/roken/strnlen.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								lib/roken/strnlen.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| /* Copyright 1996 */ | ||||
|  | ||||
| #ifdef HAVE_CONFIG_H | ||||
| #include <config.h> | ||||
| RCSID("$Id$"); | ||||
| #endif | ||||
|  | ||||
| int | ||||
| strnlen(char *s, int len) | ||||
| { | ||||
|     int i; | ||||
|     for(i = 0; i < len && s[i]; i++) | ||||
| 	; | ||||
|     return i; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Johan Danielsson
					Johan Danielsson