snipt

Ctrl+h for KB shortcuts

VB.net

ASP.Net String Manipulation (Split and Last Character)

1
2
3
str.Remove(str.Length - 1, 1)

Dim StatusArray As String() = s.Split(New Char() {","c})
https://snipt.net/embed/d423874ea7d4a5e4435085f8d0ab639a/
/raw/d423874ea7d4a5e4435085f8d0ab639a/
d423874ea7d4a5e4435085f8d0ab639a
vb.net
VB.net
3
2019-06-26T09:28:17
True
False
False
/api/public/snipt/49301/
aspnet-remove-last-character
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="n">str</span><span class="p">.</span><span class="n">Remove</span><span class="p">(</span><span class="n">str</span><span class="p">.</span><span class="n">Length</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span> </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="k">Dim</span> <span class="n">StatusArray</span> <span class="ow">As</span> <span class="kt">String</span><span class="p">()</span> <span class="o">=</span> <span class="n">s</span><span class="p">.</span><span class="n">Split</span><span class="p">(</span><span class="k">New</span> <span class="kt">Char</span><span class="p">()</span> <span class="p">{</span><span class="s">&quot;,&quot;c</span><span class="p">})</span> </span></pre></div> </td></tr></table>
asp.net, character, last, remove, split

Java

Display ASCII code for every character in java string

1
2
3
String str = "Java practice session. "; 
for (int i=0; i<str.length();i++)
System.out.println(str.charAt(i) + " as ASCII value of: " + (int)str.charAt(i) );
https://snipt.net/embed/361c29f188361c18b151dc992e2542bd/
/raw/361c29f188361c18b151dc992e2542bd/
361c29f188361c18b151dc992e2542bd
java
Java
3
2019-06-26T00:58:09
True
False
False
/api/public/snipt/34582/
display-ascii-code-for-every-character-in-java-string
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="n">String</span> <span class="n">str</span> <span class="o">=</span> <span class="s">&quot;Java practice session. &quot;</span><span class="o">;</span> </span><span id="L-2"><a name="L-2"></a><span class="k">for</span> <span class="o">(</span><span class="kt">int</span> <span class="n">i</span><span class="o">=</span><span class="mi">0</span><span class="o">;</span> <span class="n">i</span><span class="o">&lt;</span><span class="n">str</span><span class="o">.</span><span class="na">length</span><span class="o">();</span><span class="n">i</span><span class="o">++)</span> </span><span id="L-3"><a name="L-3"></a><span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="n">str</span><span class="o">.</span><span class="na">charAt</span><span class="o">(</span><span class="n">i</span><span class="o">)</span> <span class="o">+</span> <span class="s">&quot; as ASCII value of: &quot;</span> <span class="o">+</span> <span class="o">(</span><span class="kt">int</span><span class="o">)</span><span class="n">str</span><span class="o">.</span><span class="na">charAt</span><span class="o">(</span><span class="n">i</span><span class="o">)</span> <span class="o">);</span> </span></pre></div> </td></tr></table>
ascii, character, java, string

Text only

TAB Character

ALT+09
https://snipt.net/embed/0febdfa4bf4118f6f0417181caa49d05/
/raw/0febdfa4bf4118f6f0417181caa49d05/
0febdfa4bf4118f6f0417181caa49d05
text
Text only
1
2019-06-26T13:49:06
True
False
False
/api/public/snipt/13418/
tab-character
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>ALT+09 </span></pre></div> </td></tr></table>
character, shortcut