Talk:Substring

From Rosetta Code
Revision as of 09:28, 10 August 2009 by 76.173.203.32 (talk) (Created page with 'The individual subtasks here seem to cover only certain particular arbitrary use cases and not others. Why not have * substring that starts at index n and ends at index m * subst…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The individual subtasks here seem to cover only certain particular arbitrary use cases and not others. Why not have

  • substring that starts at index n and ends at index m
  • substring that starts at index n and ends at m places before the end of the string
  • substring that starts at n places before the end of the string and is of length m
  • and so on

Also, the last two subtasks seem very obscure and contrived. No language seems to have built-in methods for them. It seems that all the solutions are basically (1) find the character or substring we are looking for, and (2) use the first subtask ("starting from n characters in and of m length") to get the result. Why not just put the finding the character or substring part as a separate article? --76.173.203.32 09:28, 10 August 2009 (UTC)