popFirstMaybe

Try to pop first occurrence of needle in haystack (if any).

bool
popFirstMaybe
(
alias pred = "a == b"
C
E
)
(
ref C haystack
,
in E needle
)
if (
__traits(hasMember, C, "length") &&
__traits(hasMember, C, "popAt")
)

Return Value

Type: bool

true iff pop was made, false otherwise.

Meta