lib/string: some cleaning, doc and unit tests

Signed-off-by: Jean Privat <jean@pryen.org>
lib/string: StringCharView is no more comparable

Comparing text has only a clear meaning on a text, not on a sequence of
char.

Basically, I think that StringCharView should be private because

* it simplifies the API ; and one wants to aim a simple API for the Text class
* there should be no real services that a StringCharView can do but a
  Sequence[Char] cannot; thus no real gain to type things with the former

Signed-off-by: Jean Privat <jean@pryen.org>
lib/string: teach clients to use non deprecated services.

Mostly, this mean using `chars`.

Signed-off-by: Jean Privat <jean@pryen.org>
lib/string: fast implem for reverse

Signed-off-by: Jean Privat <jean@pryen.org>
lib/strings: remove redefinition `FlatString#[]`

Since `[]` is deprecated in strings (in favor of `.chars[]`), there
is no point of a fast implementation in FlatString.

Note that, `FlatStringCharView#[]` is already the fast path
(and is made faster by factorizing a field access)

Signed-off-by: Jean Privat <jean@pryen.org>
lib/string: remove `StringCharView:has` and `StringCharView#==`

These redefinitions are equivalent with the default implementation.
So, let the default implementation in place.

If profiling shows that the default implementation are inefficient, then
really faster redefinitions (without iterators for instance) could be
provided latter.

Signed-off-by: Jean Privat <jean@pryen.org>
lib/collection: generalize `reverse?_iterator_from?` to SequenceRead

Those services could be useful in all Sequence, not only in StringCharView

Signed-off-by: Jean Privat <jean@pryen.org>
libs/collection: implements `reverse_iterator` in Array and List

Signed-off-by: Jean Privat <jean@pryen.org>
lib/string: privatize `StringCharView` and cie.

Since there is no additional services in `StringCharView`, then exposing
the classes just add unneeded complexity.

`Text::chars` and cie. could just returns abtract Seuquence types.

Also remove the less useful virtual type `SELFVIEW`.

Signed-off-by: Jean Privat <jean@pryen.org>
Merge: lib/string: some cleaning, doc and unit tests

An important point is the generalization of services from
StringCharView to Sequences, and the privatization of StringCharView.

Closes #144
Closes #140
Pull-Request: #383
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>