Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version

line-number-from-char

Arguments: stream character-index

Returns an integer indicating the line of text in which the character-index'th character appears. The returned value 0 indicates the first line of text. character-index should be a non-negative integer (not a character object) indicating a number of characters from the beginning of the text. The value 0 indicates the first character. stream can be a multi-line-editable-text control, or a text-edit-pane.

The character index pertains to the string that is in the control, which may differ from a Lisp string that was placed into the control programmatically by calling set-text. In particular, the Windows multi-line text-editing control that is currently used by Common Graphics (implementing, e.g., the multi-line-editable-text control) always contains a Carriage Return/Linefeed pair to separate lines of text, where a Lisp string has a single newline character. Text is converted automatically when it is added to or copied from the control.

See also char-from-line-number.


Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version