File: string.yab

package info (click to toggle)
yabasic 1%3A2.91.1-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 4,168 kB
  • sloc: ansic: 12,434; sh: 4,417; makefile: 21
file content (11 lines) | stat: -rwxr-xr-x 492 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
#!./yabasic

if left$("abc",2)<>"ab" error "left$ has problems"
if right$("abc",2)<>"bc" error "right$ has problems"
if mid$("abc",2,1)<>"b" error "mid$ has problems"
if chomp$("foo\n")<>"foo" error "chomp$ has problems"
if chomp$("foo")<>"foo" error "chomp$ has problems"
if not glob("foobar","*bar") error "glob has problems"
if not glob("bar","*bar") error "glob has problems"
if len("foo\"")<>4 error "strlen has problems"
if string$(4,"foo")<>"foofoofoofoo" error "string$ has problems"