Erlang: reverse search in binaries

string erlang

70 观看


151 作者的声誉

Is there an analogue to string:rstr() for binaries?

I am also puzzled by the fact that while the proposal EEP-9 suggesting implementing this within binary_string module was adopted for R12B-2 the current OTP docs do not mention this module at all.

作者: aickley 的来源 发布者: 2017 年 12 月 27 日

回应 (1)


71 作者的声誉

I think you should use binary:match instead. binary:match will return first occurrence of Pattern in Subject and the position and length in a tuple.But we should notice that string:rstr returns the first occurrence of Pattern begins in Subject.

作者: Tianpo Gao 发布者: 28.12.2017 12:32