-
Notifications
You must be signed in to change notification settings - Fork 94
substr
Ryzom Core Wiki edited this page Jul 8, 2024
·
3 revisions
title: Substring description: published: true date: 2023-03-16T23:12:22.988Z tags: editor: markdown dateCreated: 2023-03-16T22:30:26.743Z
The substr native AI script function returns a substring of the input string.
(substring: s)substr(string: s, start: f, length: f)
- string (string): The input string.
- start (float): The index of the first character to copy.
- length (float): The length of the returned substring.
-
substring (string): A substring of the input string starting at character
start
andlength
characters long.
($str)result = substr("Hello, world!", 7, 5);
This example code returns the substring "world".