mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Thanks to Hashbox for a patch to:
Implementing llStringTrim and hooking in osRegionNotice
This commit is contained in:
@@ -3062,6 +3062,14 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
return ret;
|
||||
}
|
||||
|
||||
public string llStringTrim(string src, int type)
|
||||
{
|
||||
if (type == (int)LSL_BaseClass.STRING_TRIM_HEAD) { return src.TrimStart(); }
|
||||
if (type == (int)LSL_BaseClass.STRING_TRIM_TAIL) { return src.TrimEnd(); }
|
||||
if (type == (int)LSL_BaseClass.STRING_TRIM) { return src.Trim(); }
|
||||
return src;
|
||||
}
|
||||
|
||||
//
|
||||
// OpenSim functions
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user