Softanza
StartFrançais
Softanza
Reference · stzString

Content()

getting content of the string

also written: Text · AsWell · String · ToString · TheString · Stringified · DeepStringified

Basic examples (2)

Softanza
o1 = new stzList([ 1, 2, 3 ])
? @@( o1 + Q(4) + 5 )
? @@( (o1 + Q("X" : "Z")).content() )
Output
[ 1, 2, 3, 4, 5 ]
[ 1, 2, 3, [ "X", "Y", "Z" ] ]

run on 2026-10-02 04:22 inside the library at commit 0e72e2e2c; taken from 408_plus_operator.ring(opens in a new tab)

Softanza
o1 = new stzString("File")
? o1 * 3
? o1 + "File"
? @@( o1 / 4 )
? o1.Content()
Output
FileFileFile
FileFile
[ "F", "i", "l", "e" ]
File

run on 2026-10-02 04:23 inside the library at commit 0e72e2e2c; taken from 583_string_operators.ring(opens in a new tab)

Scope (4)

Softanza
o1 = new stzString("A**BC***DE***")
# stars removed in the result
? o1 - "*"
# ... but the object keeps them
? o1.Content()
Output
ABCDE
A**BC***DE***

run on 2026-10-02 04:24 inside the library at commit 0e72e2e2c; taken from 996_minusoperator.ring(opens in a new tab)

Softanza
o2 = new stzString("R I N G")
# Copy().ReplaceQ() returns the changed copy
? o2.Copy().ReplaceQ(" ", "-").Content()
# the original is unchanged
? o2.Content()
Output
R-I-N-G
R I N G

run on 2026-10-02 04:24 inside the library at commit 0e72e2e2c; taken from 55_replace_ref_vs_copy.ring(opens in a new tab)

Softanza
o1 = new stzString("ilir")
# Copy().Uppercase.Spacify.Replace(' ','*') -> I*L*I*R
? o1.Copy().UppercaseQ().SpacifyQ().ReplaceQ(" ", "*").Content()
# the original is unchanged
? o1.Content()
Output
I*L*I*R
ilir

run on 2026-10-02 04:24 inside the library at commit 0e72e2e2c; taken from 52_copy.ring(opens in a new tab)

Softanza
o1 = new stzString("Barack Obama loves the wonderful city of Paris.")
# string delegates to the domain
? o1.Sentiment()
# Q(str).TextQ() reaches the same domain object
? o1.TextQ().Sentiment()
# Text() (no Q) returns DATA -- the content, not an object
? o1.Text()
ot = StzTextQ("Barack Obama loves the wonderful city of Paris.")
# a stzText is the domain object itself
? @@(ot.PersonNames())
# stzText inherits the structural layer (Words) from stzStringText
? len(ot.Words())
Output
positive
positive
Barack Obama loves the wonderful city of Paris.
[ "Barack Obama" ]
8

run on 2026-10-02 04:23 inside the library at commit 0e72e2e2c; taken from text_query_layer_narrated.ring(opens in a new tab)

The extensions of this method

Each extension, and whether it exists for this method; an extension that exists combines with the others (FindSTCS).

Extension
Exists
What it adds · The names
Q
yes
does what the method does, then returns the object, so the call can be chained · TextQ, StringQ, ContentQ, ToStringQ and 1 more
QQ
no
chains on the next, more specific type of object (the Q ladder)
QQQ
no
chains on the most specific type of object (the Q ladder)
QRT
no
returns the result as an object of the requested type
CS
no
takes a case-sensitivity flag
ST
no
takes the position to start from (StartingAt)
IB
no
takes bounds that are included (IncludingBounds)
XT
no
the extended form: more parameters than the base method
XTT
no
yet another extension: a further extended form, after XT
Z
no
includes the position in what it returns
ZZ
no
returns positions as sections, [start, end]
W
no
selects by a condition
WF
no
selects by a condition, with the expressive keywords (@NextItem, @PreviousItem...)
D
no
takes a direction, forward or backward (Directional)
F
no
takes a function (the condition or the update is given as a function); the forms document also uses F for the future form, which defers the action
Many
no
works on a collection of items instead of one (the plural form)
Except
no
takes exceptions, what to leave out (the exceptional form)
U
no
returns the result without duplication

Every example is a test file of the library, run inside the library for this page; only those whose output kept every promise their file wrote are shown.

See also