Functional Delimiter Algorithm, not very optimal