You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
str has no rfind, bytes() or trim_start(): a one-off With tool had to hand-roll each #2206
Writing tools/pub_private_methods.w (#2186) as a With script, three ordinary string operations were unknown method … for type 'str':
s.rfind(":"): the last occurrence (split on a path:line pair). Worked around with split(":") and slicing.
for b in s.bytes(): iterate the bytes. Worked around with for i in 0..s.len(): s[i].
s.trim_start() / trim_end(): the indentation and the rest of a line. Worked around with a while loop over ' ' and '\\t'.
These are the same class as #959 (one-liner text conveniences): each is what a sed/awk/perl one-liner reaches for, and AGENTS.md requires these tools be written in With.
Activity
std.string: str.rfind, trim_start/trim_end as views, bytes() (D105, #…