forked from OctaForge/libcubescript
remove list_explode
parent
b5568456a5
commit
ed106d7e11
|
@ -779,9 +779,6 @@ private:
|
||||||
OSTD_EXPORT ostd::Maybe<CsString> list_index(
|
OSTD_EXPORT ostd::Maybe<CsString> list_index(
|
||||||
CsState &cs, ostd::ConstCharRange s, ostd::Size idx
|
CsState &cs, ostd::ConstCharRange s, ostd::Size idx
|
||||||
);
|
);
|
||||||
OSTD_EXPORT CsVector<CsString> list_explode(
|
|
||||||
CsState &cs, ostd::ConstCharRange s, ostd::Size limit = -1
|
|
||||||
);
|
|
||||||
|
|
||||||
template<typename R>
|
template<typename R>
|
||||||
inline ostd::Ptrdiff format_int(R &&writer, CsInt val) {
|
inline ostd::Ptrdiff format_int(R &&writer, CsInt val) {
|
||||||
|
|
|
@ -410,17 +410,6 @@ endblock:
|
||||||
}
|
}
|
||||||
return ostd::move(p.element());
|
return ostd::move(p.element());
|
||||||
}
|
}
|
||||||
|
|
||||||
OSTD_EXPORT CsVector<CsString> list_explode(
|
|
||||||
CsState &cs, ostd::ConstCharRange s, ostd::Size limit
|
|
||||||
) {
|
|
||||||
CsVector<CsString> ret;
|
|
||||||
ListParser p(cs, s);
|
|
||||||
while ((ret.size() < limit) && p.parse()) {
|
|
||||||
ret.push(ostd::move(p.element()));
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
} /* namespace util */
|
} /* namespace util */
|
||||||
|
|
||||||
} /* namespace cscript */
|
} /* namespace cscript */
|
||||||
|
|
Loading…
Reference in New Issue