A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
14
Task/Binary-strings/Icon/binary-strings-1.icon
Normal file
14
Task/Binary-strings/Icon/binary-strings-1.icon
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
s := "\x00" # strings can contain any value, even nulls
|
||||
s := "abc" # create a string
|
||||
s := &null # destroy a string (well sbsnfon it for garbage collection)
|
||||
v := s # assignment
|
||||
s == t # expression s equals t
|
||||
s << t # expression s less than t
|
||||
s <<= t # expression s less than or equal to t
|
||||
v := s # strings are immutable, no copying or cloning are needed
|
||||
s == "" # equal empty string
|
||||
*s = 0 # string length is zero
|
||||
s ||:= "a" # append a byte "a" to s via concatenation
|
||||
t := s[2+:3] # t is set to position 2 for 3 characters
|
||||
s := replace(s,s2,s3) # IPL replace function
|
||||
s := s1 || s2 # concatenation (joining) of strings
|
||||
Loading…
Add table
Add a link
Reference in a new issue