# optimize string search on black-box function

Given a lower-bound predicate function which returns true if an input is greater than or equal to a constant string, what is the optimal way to search for the constant? The strings should be lexicographical compared.

For example, given a handle to the following function, but not knowing the specific constant used:

fn lower_bound(s: &[u8]) -> bool {
s >= &[10, 20, 30]
}


What is the optimal algorithm for determining the enclosed value of &[10, 20, 30]? A maximum length for the value can be assumed if that makes it more tractable.