// // Copyright 2020 FoxyUtils ehf. All rights reserved. // // This is a commercial product and requires a license to operate. // A trial license can be obtained at https://unidoc.io // // DO NOT EDIT: generated by unitwist Go source code obfuscator. // // Use of this source code is governed by the UniDoc End User License Agreement // terms that can be accessed at https://unidoc.io/eula/ package algo ;import _g "strconv";func _a (_d byte )bool {return _d >='0'&&_d <='9'};func RepeatString (s string ,cnt int )string {if cnt <=0{return "";};_ac :=make ([]byte ,len (s )*cnt );_gf :=[]byte (s );for _gd :=0;_gd < cnt ;_gd ++{copy (_ac [_gd :],_gf );};return string (_ac );}; // NaturalLess compares two strings in a human manner so rId2 sorts less than rId10 func NaturalLess (lhs ,rhs string )bool {_c ,_ad :=0,0;for _c < len (lhs )&&_ad < len (rhs ){_e :=lhs [_c ];_b :=rhs [_ad ];_ef :=_a (_e );_cb :=_a (_b );switch {case _ef &&!_cb :return true ;case !_ef &&_cb :return false ;case !_ef &&!_cb :if _e !=_b {return _e < _b ;};_c ++;_ad ++;default:_fb :=_c +1;_be :=_ad +1;for _fb < len (lhs )&&_a (lhs [_fb ]){_fb ++;};for _be < len (rhs )&&_a (rhs [_be ]){_be ++;};_bb ,_ :=_g .ParseUint (lhs [_c :_fb ],10,64);_cbe ,_ :=_g .ParseUint (rhs [_c :_be ],10,64);if _bb !=_cbe {return _bb < _cbe ;};_c =_fb ;_ad =_be ;};};return len (lhs )< len (rhs );};