fix bug in FBString::find
Summary: Standard (21.4.7.2 / 1): > Determines the lowest position xpos, if possible, such that both of the following conditions obtain: - pos <= xpos and xpos + str.size() <= size(); - traits::eq(at(xpos+I), str.at(I)) for all elements I of the string controlled by str. The existing logic violates the first requirement for `str.size() == 0` by unconditionally returning `pos`. Reviewed By: ot, Gownta Differential Revision: D3698862 fbshipit-source-id: 9622f1b99b259d2d81ae83795dff9cd94619c725
Showing
Please register or sign in to comment