Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

Prism::Source#compute_offsets

compute_offsets(code)

Find all of the newlines in the source code and return their byte offsets from the start of the string an array.