Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 9.0
Unrevised from 8.2 to 9.0.
8.2 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-2012, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 9.0. This page was not revised from the 8.2 page.
Created 2012.5.30.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 9.0
Unrevised from 8.2 to 9.0.
8.2 version