DescriptionFill out the rest of the StringPiece functions for 16-bit.
I was originally opposed to these since we didn't need them and they were complicated. But I'm wanting to use some of these functions in a different patch, so it seems like a good time to fill out the std::string-like finding functions for StringPiece16.
This deletes the old StringPieceDetails for which the only point was to share the common stuff between the two BasicStringPiece specializations.
I used the pattern of having two versions of each function declared in the header and then expanding the template in the .cc file, to avoid template bloat in the header.
This replaces all of the size_type goop with size_t. Chrome code assumes these are the same and we encourage people to just use size_t in loops, for example, rather than using the size_type of the template they're iterating over. This makes the code more readable in many places. It also solves a problem with declaration ordering since most of the functions that used size_type are now moved above where the size_type is actually declared.
R=viettrungluu@chromium.org
TBR=akalin, ben
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255397
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256311
Patch Set 1 #Patch Set 2 : #Patch Set 3 : #
Total comments: 4
Patch Set 4 : review comments #Patch Set 5 : try failures #Patch Set 6 : fix #Patch Set 7 : #Patch Set 8 : #
Messages
Total messages: 7 (0 generated)
|