Sublime Forum

Extract point from region

#1

I’m using view.find('string', 0) to search a word. The find function returns (a, b) points and I want to extract the first point of the region when there is a match. What is the most efficient way to do this?

0 Likes

#2

I’ll answer myself the way is

view.find('string', 0).a

or

point = view.find('string', 0)
point = point.a
0 Likes