<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">
<rss version="0.91">
<channel>
<title>「文字列の長さ（文字数）を取得する」へのコメント</title>
<link>https://dobon.net/cgi-bin/pc/pc.php?mode=v&amp;id=string%2Fstringlength.html</link>
<description>「文字列の長さ（文字数）を取得する」に投稿されたコメントの一覧</description>
<language>ja</language>
<image>
<url>https://dobon.net/banner/dbs1.gif</url>
<link>https://dobon.net/cgi-bin/pc/pc.php?mode=v&amp;id=string%2Fstringlength.html</link>
<title>「文字列の長さ（文字数）を取得する」へのコメント</title>
<width>88</width>
<height>31</height>
</image>
<item>
<title>通常のコメント</title>
<link>https://dobon.net/cgi-bin/pc/pc.php?mode=v&amp;id=string%2Fstringlength.html#1</link>
<description><![CDATA[Dim insuu As Integer = RichTextBox1.SelectionStart<br>        Dim from_the_beginning_of_the_line As Integer = 0<br>        Dim oun_line As Integer = 0<br>        Dim n() As String = Split(RichTextBox1.Text, vbCrLf)<br>        Dim ni As Integer = 0<br>        Dim maxn As Integer = 0 ' n.Length - 1<br>        For i = 0 To n.Length - 1<br>            oun_line = 0<br>            If n(ni) Is &quot;&quot; Then<br>                '   maxn += 1<br>            Else<br>                oun_line = n(ni).Length<br>                maxn += n(ni).Length<br>            End If<br>            If maxn &gt;= insuu Then<br>                'ここで、入ってきた数が大きくなったら、カーソール越した ni が行で、n(ni).Length-(maxn-insuu)行頭から現在の位置<br>                from_the_beginning_of_the_line = n(ni).Length - (maxn - insuu)<br>                Exit For<br>            End If<br>            maxn += 2<br>            ni += 1<br>        Next<br><br>        Dim answer As Integer = maxn  'ここか<br>        Dim Number_of_line_breaks As Integer = n.Length]]></description>
</item>
</channel>
</rss>