Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在richedit(Delphi XE)中计算字符时遇到问题。结果,对于每一个新行,我都会多得到两个字符,但在文本中它们不存在。
示例:这里有 15 个字符,但 Richedit 由于换行而给出了 17 个字符。
零线 第一行
有解决方案吗?
删除 CR/LF 并获取剩余字符数。一个例子:
NumChars := Length(StringReplace(RichEdit1.Text, sLineBreak, '', [rfReplaceAll]));