File: counttest.kbs

package info (click to toggle)
basic256 2.0.99.10-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,888 kB
  • sloc: cpp: 17,185; yacc: 4,025; lex: 1,466; java: 1,091; sh: 39; xml: 33; makefile: 20
file content (12 lines) | stat: -rw-r--r-- 403 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
# counttest.jbs 2011-01-05 j.m.reneau
# for version 0.9.6.56

a$ = "We all live in a yellow submarine, yellow submarine, yellow, submarine."

print a$
print "count of w = " + count(a$,"w")
print "count of W = " + count(a$,"W")
print "count of YeLlOw (ignore case) = " + count(a$,"YeLlOw",true)
print "count of W (ignore case) = " + count(a$,"W",true)
print "count of regex [Ww] = " + countx(a$,"[Ww]")