Line Number...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Line Number...

Arturo Zambrano
Hi,
 given a text file and an offset, is there any class//message to obtain the
line  number of that offset?
 I just don't want to reinvent the wheel :)

TIA
arturo
Reply | Threaded
Open this post in threaded view
|

Re: Line Number...

Pharo Smalltalk Users mailing list
You probably need:

String>>#lineNumberCorrespondingToIndex:

-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


On Tuesday, November 20, 2018, 9:17:34 p.m. EST, Arturo Zambrano <[hidden email]> wrote:


Hi,
 given a text file and an offset, is there any class//message to obtain the
line  number of that offset?
 I just don't want to reinvent the wheel :)

TIA
arturo
Reply | Threaded
Open this post in threaded view
|

Re: Line Number...

Arturo Zambrano
Thanks!, I was not aware of that.

On Wed, Nov 21, 2018 at 2:21 AM Benoit St-Jean via Pharo-users <[hidden email]> wrote:
You probably need:

String>>#lineNumberCorrespondingToIndex:

-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


On Tuesday, November 20, 2018, 9:17:34 p.m. EST, Arturo Zambrano <[hidden email]> wrote:


Hi,
 given a text file and an offset, is there any class//message to obtain the
line  number of that offset?
 I just don't want to reinvent the wheel :)

TIA
arturo