strange behaviour with `find_first/last_not_of()` functions
- From: Nicolas Jäger <jagernicolas legtux org>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: strange behaviour with `find_first/last_not_of()` functions
- Date: Wed, 19 Aug 2015 22:54:06 -0400
hi,
I'm working on a piece of code where an entry is used to write some
tags seperated by ';'. So I'm using `split_simple(";", text)` to get a
`std::vector` loaded of each terms between ';'. At this point if the
user wrote something like :
"gtkmm ; is; awesome"
the vector record :
"gtkmm ", " is", " awesome"
to avoid duplicate tags I want to
remove all blank space at the begining and at the end of each terms.
For doing this I'm using `find_first_not_of( " " )` and
`find_last_not_of( " " )`. with the example above, that works as
expected.
but there is one case who leads to an error. If I just type " ;" (blank
space and a semicolon), the both (finders) functions return a value of
4294967295
here the code : http://pastebin.com/zLjd2T2k
regards,
nicolas
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]