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
Returns the string extended to length _width_, post-filled with repeating _pad_.\
174
+
If _pad_ is omitted, it is filled with spaces(`' '`).\
175
+
If _pad_ is too long, the end of _pad_ is truncated.
176
+
177
+
```aiscript playground
178
+
let x = "5"
179
+
180
+
<: `I want {x.pad_end(4, "0")} yen`
181
+
```
182
+
183
+
### @(_v_: str).trim(): str
184
+
Returns the string trimmed of leading and/or trailing spaces.
185
+
186
+
```aiscript playground
187
+
let x = " Hello World! "
188
+
189
+
<: x.trim()
190
+
```
191
+
192
+
### @(_v_: str).upper(): str
193
+
Returns the string with all lowercase letters uppercased.
194
+
195
+
```aiscript playground
196
+
let x = "Hello World!"
197
+
198
+
<: x.upper()
199
+
```
200
+
201
+
### @(_v_: str).lower(): str
202
+
Returns the string with all uppercase letters lowercased.
203
+
204
+
```aiscript playground
205
+
let x = "Hello World!"
206
+
207
+
<: x.lower()
208
+
```
209
+
210
+
### @(_v_: str).charcode_at(_i_: num): num | null
211
+
Returns the [integer from `0` to `65535` representing the UTF-16 code unit](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt) of the _i_-th character in the string.\
212
+
Index is based on UTF-16 code units.\
213
+
If the string contains surrogate pairs, it may return a higher or lower isolated surrogate, depending on the position.\
214
+
Returns null when _i_-th character does not exist.
215
+
216
+
### @(_v_: str).codepoint_at(_i_: num): num | null
217
+
Returns the [code point value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt) of the _i_-th character in the string.\
218
+
Index is based on UTF-16 code units.\
219
+
If the string contains a surrogate pair and the specified position is a lower surrogate, the lower isolated surrogate is returned.\
220
+
Returns null when _i_-th character does not exist.
0 commit comments