snipt

Ctrl+h for KB shortcuts

Text only

去除char array后的换行符

int len = strlen(a);
a[len-1] = 0;
https://snipt.net/embed/90652f9ee650fc319b09ac97c2418e24/
/raw/90652f9ee650fc319b09ac97c2418e24/
90652f9ee650fc319b09ac97c2418e24
text
Text only
2
2019-06-17T05:31:11
True
False
False
/api/public/snipt/43403/
char-array
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>int len = strlen(a); </span><span id="L-2"><a name="L-2"></a>a[len-1] = 0; </span></pre></div> </td></tr></table>
string