bugfix : fix #13 added method trimPrefixIndex