“LlDeleteSubString”的版本间的差异
| 第11行: | 第11行: | ||
| − | |注意事项= | + | |注意事项=注意事项 |
*If either start or end are out of bounds the script continues to execute without an error message. | *If either start or end are out of bounds the script continues to execute without an error message. | ||
*start & end will form an exclusion range when start is past end (Approximately: start > end). | *start & end will form an exclusion range when start is past end (Approximately: start > end). | ||
2020年4月13日 (一) 09:13的版本
| 首页 | 函数 | 事件 | 类型 | 操作符 | 常数 | Flow Control | Script Library | Categorized Library | Tutorials |
| 函数名 |
|---|
| Function: string llDeleteSubString( string src, integer start, integer end ); |
参数:
|
| 返回值:Returns a string that is the result of removing characters from src from start to end. |
| 注意事项 |
|---|
注意事项
|
| 示例 |
|---|
示例1
default
{
state_entry()
{
string ex = "abcdefghi";
llDeleteSubString(ex, 4, 7); //Incorrect!
}
}
示例2 default
{
state_entry()
{
string ex = "abcdefghi";
ex = llDeleteSubString(ex, 4, 7); //Correct
llSay(0, ex); //Would say "abcdi"
}
}
示例3(特例) //-- special case
default
{
state_entry()
{
string ex = "abcdefghi";
llSay( 0, llDeleteSubString(ex, 4, 7) ); //Would say "abcdi"
//-- acceptable if you do NOT want to change the contents of 'ex', only the output
}
}
|
| 相关函数 |
|---|
| llGetSubString |
| 相关事件 |
|---|