<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Форум компьютерной помощи &mdash; Lotusscript - оставить только нужные символы в строке.]]></title>
	<link rel="self" href="https://itpmr.ru/extern.php?action=feed&amp;tid=989&amp;type=atom" />
	<updated>2016-08-02T10:51:04Z</updated>
	<generator>PunBB</generator>
	<id>https://itpmr.ru/viewtopic.php?id=989</id>
		<entry>
			<title type="html"><![CDATA[Lotusscript - оставить только нужные символы в строке.]]></title>
			<link rel="alternate" href="https://itpmr.ru/viewtopic.php?pid=124570#p124570" />
			<content type="html"><![CDATA[<p>Этот скрипт оставляет в строке mystr только нужные символы - удаляя крокозяблы и всякие спецсимволы, анализируя Asc код каждого символа.</p><div class="codebox"><pre><code>Sub Click(Source As Button)
    Print &quot;---&quot;
    Dim mystr As String, ascx As String, tmpstr  As String
    tmpstr= &quot;&quot;
    mystr = &quot;19 ая АЯ az AZ!@#!(*&amp;^(o№#%(*?)БЮ,/*-123&quot;
    lenstr% = Len(mystr)
    For x=1 To lenstr%
        ascx =  Mid$(mystr,x,1) 
        If (Asc(ascx)&gt;31)  And (Asc(ascx)&lt;128) Or (Asc(ascx)&gt;144)  And (Asc(ascx)&lt;153) Or (Asc(ascx)&gt;191)  And (Asc(ascx)&lt;256) Then        
            tmpstr = tmpstr + ascx
        End If
    Next
    Print tmpstr
End Sub</code></pre></div><p>А возникла проблема с такого вопроса:</p><p>Как преобразовать строку mystr (String) в массив, чтобы потом я мог пройтись по каждому символу строки?<br />For x=0 To Ubound (mystr)<br />Или как-то по другому можно? с помощю Len и mid</p>]]></content>
			<author>
				<name><![CDATA[admin]]></name>
				<uri>https://itpmr.ru/profile.php?id=2</uri>
			</author>
			<updated>2016-08-02T10:51:04Z</updated>
			<id>https://itpmr.ru/viewtopic.php?pid=124570#p124570</id>
		</entry>
</feed>
