You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Strings are immutable sequences of characters, which means that once a [`String{:tact}`][p] is created, it cannot be changed. Strings are useful to store text, and so they can be converted to [`Cell{:tact}`][cell] type to be used as message bodies.
7
9
8
10
To be able to concatenate strings in a gas-efficient way, use a [`StringBuilder{:tact}`][p].
@@ -105,6 +107,8 @@ let fizz: StringBuilder = beginString()
105
107
106
108
## StringBuilder.toString
107
109
110
+
<Badgetext="Gas-expensive"title="Uses 500 gas units or more"variant="danger"size="medium"/><p/>
111
+
108
112
```tact
109
113
extends fun toString(self: StringBuilder): String;
110
114
```
@@ -122,6 +126,8 @@ let buzz: String = fizz.toString();
122
126
123
127
## StringBuilder.toCell
124
128
129
+
<Badgetext="Gas-expensive"title="Uses 500 gas units or more"variant="danger"size="medium"/><p/>
130
+
125
131
```tact
126
132
extends fun toCell(self: StringBuilder): Cell;
127
133
```
@@ -139,6 +145,8 @@ let buzz: Cell = fizz.toCell();
139
145
140
146
## StringBuilder.toSlice
141
147
148
+
<Badgetext="Gas-expensive"title="Uses 500 gas units or more"variant="danger"size="medium"/><p/>
149
+
142
150
```tact
143
151
extends fun toSlice(self: StringBuilder): Slice;
144
152
```
@@ -187,6 +195,8 @@ fizz == buzz; // true, but be careful as it's not always the case
187
195
188
196
## String.asComment
189
197
198
+
<Badgetext="Gas-expensive"title="Uses 500 gas units or more"variant="danger"size="medium"/><p/>
199
+
190
200
```tact
191
201
extends fun asComment(self: String): Cell;
192
202
```
@@ -277,6 +287,8 @@ let fizz: Slice = s.fromBase64();
277
287
278
288
## Int.toString
279
289
290
+
<Badgetext="Gas-expensive"title="Uses 500 gas units or more"variant="danger"size="medium"/><p/>
0 commit comments