Return the longest prefix of 'this' such that every character in the prefix satisfies the given predicate.
Declared in <llvm/ADT/StringRef.h>
[[nodiscard]]
StringRef
take_while(function_ref<bool(char)> F) const;
Longest prefix whose characters all satisfy F.
The return value should not be discarded.
| Name | Description |
|---|---|
| F | Predicate that identifies characters to keep from the front. |