🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.javascript
Article #49847

newbie: łatwe: zliczanie wystąpień znaku w stringu

#49847
From: jivanmuktaWYTNIJTO
Date: Thu, 25 Feb 2010 11:12
7 lines
1201 bytes
Uczę się JS i mam taki problem:
jak najprościej zliczyć w stringu wszystkie wystąpienia znaku "\n"? Czy da się
bez pisania pętle? Nie mogę znaleźć odpowiedniej funkcji.


-- 
Wysłano z serwisu OnetNiusy: http://niusy.onet.pl
Technical Details
Message-ID: <4c17.0000009b.4b865b2c@newsgate.onet.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!newsgate1.onet.pl!niusy.onet.pl

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!newsgate1.onet.pl!niusy.onet.pl
From: jivanmuktaWYTNIJTO@poczta.onet.pl
Newsgroups: pl.comp.lang.javascript
Subject: newbie: łatwe: zliczanie
 wystąpień  znaku w stringu
Date: Thu, 25 Feb 2010 12:12:44 +0100
Organization: Onet.pl
Lines: 7
Sender: news@newsgate.onet.pl
Message-ID: <4c17.0000009b.4b865b2c@newsgate.onet.pl>
NNTP-Posting-Host: newsgate1.onet.pl
Mime-Version: 1.0
X-Trace: newsgate.onet.pl 1267096364 8025 213.180.130.17 (25 Feb 2010 11:12:44 GMT)
X-Complaints-To: niusy@onet.pl
NNTP-Posting-Date: Thu, 25 Feb 2010 11:12:44 +0000 (UTC)
X-Mailer: http://niusy.onet.pl
X-Forwarded-For: 83.24.49.214, 10.174.28.54
X-User-Agent: Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.9.1.8)   Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit