Top-rated Batch recipes tagged "string"http://code.activestate.com/recipes/langs/batch/tags/string/top/2013-10-10T16:27:48-07:00ActiveState Code RecipesString length (Batch) 2013-10-10T16:27:48-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578664-string-length/ <p style="color: grey"> Batch recipe 578664 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/length/">length</a>, <a href="/recipes/tags/string/">string</a>). Revision 2. </p> <p>A way for checking string length.</p> Split string sample (Batch) 2013-08-13T11:29:44-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578638-split-string-sample/ <p style="color: grey"> Batch recipe 578638 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/split/">split</a>, <a href="/recipes/tags/string/">string</a>). </p> <p>Target: we have a task to split the string ("this is a string") on the characters. Possible solution:</p> Formating strings (print a table) (Batch) 2013-06-18T07:52:03-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578562-formating-strings-print-a-table/ <p style="color: grey"> Batch recipe 578562 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/format/">format</a>, <a href="/recipes/tags/string/">string</a>, <a href="/recipes/tags/table/">table</a>). </p> <p>As you know there are no escape characters such as "\t" in the windows command language but it does not mean that we can not format text. Command prompt has its own tricks. At firstly, you need declare enabledelayedexpansion after setlocal command in your batch file to get access for some interesting things; secondly, use &lt;code&gt;&lt;nul set /p "str=[string]"&lt;/code&gt; construction which is equal print function in C language. OK, next batch file print multiplication table.</p>