Divide the string into its two halves
$ x = leastLexiString ( substr ( $ s , 0 , floor ( strlen ( $ s ) / 2 ) ) ) ; $ y = leastLexiString ( substr ( $ s , floor ( strlen ( $ s ) / 2 ) , strlen ( $ s ) ) ) ;