Implement algorithm of string distance calculation from PostgreSQL
We need this algorithm in order to calculate the part of bucket String value takes when it falls into it.
The formula is (value - left_border) / (right_border - left_border) and we don't have implementation of Sub for Stirngs.
Edited by Emir Vildanov