Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to get the Line Length of a given TEditor / TFileEditor Textline based on cursor.y ?#152

Answeredbymagiblot
paule32 asked this question inQ&A
Discussion options

Hello,
how can I get the Length of a Textline from start till the end of line EOL ?

You must be logged in to vote

You may use thelineStart,lineEnd andcharPos methods. For example:

uint currentLineLengthInBytes = lineEnd(curPtr) - lineStart(curPtr);uint currentLineWidth = charPos(lineStart(curPtr), lineEnd(curPtr));uint lengthInBytesFromCurrentPositionUntilEol = lineEnd(curPtr) - curPtr;uint widthFromCurrentPositionUntilEol = charPos(curPtr, lineEnd(curPtr));

Replies: 1 comment

Comment options

You may use thelineStart,lineEnd andcharPos methods. For example:

uint currentLineLengthInBytes = lineEnd(curPtr) - lineStart(curPtr);uint currentLineWidth = charPos(lineStart(curPtr), lineEnd(curPtr));uint lengthInBytesFromCurrentPositionUntilEol = lineEnd(curPtr) - curPtr;uint widthFromCurrentPositionUntilEol = charPos(curPtr, lineEnd(curPtr));
You must be logged in to vote
0 replies
Answer selected bypaule32
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@paule32@magiblot

[8]ページ先頭

©2009-2025 Movatter.jp