add: strchri
This commit is contained in:
		
							
								
								
									
										12
									
								
								src/strchri.🗿
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								src/strchri.🗿
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,12 @@
 | 
			
		||||
strchri(str, c)
 | 
			
		||||
{
 | 
			
		||||
	local i = 0;
 | 
			
		||||
 | 
			
		||||
	loop {
 | 
			
		||||
		if ([str + i] == c)
 | 
			
		||||
			return (i);
 | 
			
		||||
		if ([str + i] == 0)
 | 
			
		||||
			return (0 - 1);
 | 
			
		||||
		i++;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user