lib/strings: simplify removePrefix readability
It was discussed as a part of #2570.
This commit is contained in:
		
							parent
							
								
									5bbcebf2db
								
							
						
					
					
						commit
						180bd65cd0
					
				@ -155,8 +155,8 @@ rec {
 | 
			
		||||
      preLen = stringLength pre;
 | 
			
		||||
      sLen = stringLength s;
 | 
			
		||||
    in
 | 
			
		||||
      if pre == substring 0 preLen s then
 | 
			
		||||
        substring preLen (sub sLen preLen) s
 | 
			
		||||
      if hasPrefix pre s then
 | 
			
		||||
        substring preLen (sLen - preLen) s
 | 
			
		||||
      else
 | 
			
		||||
        s;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user