~pac72/ubuntu/lucid/ddd/devel

« back to all changes in this revision

Viewing changes to ddd/tString.exp

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Schepler
  • Date: 2004-07-22 03:49:37 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040722034937-cysl08t1jvba4jrx
Tags: 1:3.3.9-3
USERINFO has been renamed to USERINFO.txt; adjust debian/rules code
to match, to get correct information on the About DDD dialog.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
an empty string:
2
 
A string initialized to Hello:Hello
3
 
A string initialized to previous string:Hello
4
 
A string initialized to previous string.at(1, 2):el
5
 
A string initialized to @:@
6
 
A string initialized to dec(20):20
7
 
n = 20 atoi(n) = 20 atof(n) = 20
8
 
z = x + y = Helloworld
9
 
x += y; x = Helloworld
10
 
y.prepend(x); y = Helloworld
11
 
cat(x, y, x, x); x = HelloworldHello
12
 
cat(y, x, x, x); x = worldHelloHello
13
 
z = x + s +  + y.at(w) + y.after(w) + . = Hello, world.
14
 
ch = x[0] = H
15
 
z = x.at(2, 3) = llo
16
 
x.at(2, 2) = r; x = Hero
17
 
x.at(0, 1) = j; x = jello
18
 
x.at(He) = je; x = jello
19
 
x.at(l, -1) = i; x = Helio
20
 
z = x.at(r) = ello
21
 
z = x.before(o) = Hell
22
 
x.before(ll) = Bri; x = Brillo
23
 
z = x.before(2) = He
24
 
z = x.after(Hel) = lo
25
 
x.after(Hel) = p; x = Help
26
 
z = x.after(3) = o
27
 
z =   a bc; z = z.after(rxwhite); z =a bc
28
 
x.gsub(l, ll); x = Hellllo
29
 
x.gsub(r, ...); x = Hello should have been replaced by this string
30
 
x.gsub(rxwhite, #); x = Hello#should#have#been#replaced#by#this#string
31
 
z = x+y; z.del(loworl); z = Held
32
 
reverse(x) = olleH
33
 
x.reverse() = olleH
34
 
upcase(x) = HELLO
35
 
downcase(x) = hello
36
 
capitalize(x) = Hello
37
 
capitalize(z) = He Asked:'This Is Nathan'S Book?'. 'No, It'S Not',I Said.
38
 
z = replicate(*, 10) = **********
39
 
z = This string has
40
 
five words
41
 
from split(z, rxwhite, w, 10), n words = 5:
42
 
This
43
 
string
44
 
has
45
 
five
46
 
words
47
 
z = join(w, nw, /); z =This/string/has/five/words
48
 
enter a word:word =abcdefghijklmnopqrstuvwxyz length = 26
49
 
 
50
 
End of test