-
Notifications
You must be signed in to change notification settings - Fork 7
Deprecate LSL String functions #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -476,14 +476,14 @@ declare ll: { | |
| AvatarOnSitTarget: () -> uuid, | ||
| Axes2Rot: (Forward: vector, Left: vector, Up: vector) -> quaternion, | ||
| AxisAngle2Rot: (Axis: vector, Angle: number) -> quaternion, | ||
| Base64ToInteger: (Text: string) -> number, | ||
| Base64ToString: (Text: string) -> string, | ||
| Base64ToInteger: @[deprecated {reason="Use 'llbase64.decode' and 'string.unpack' or 'buffer.readi32' instead."}](Text: string) -> number, | ||
| Base64ToString: @[deprecated {use='llbase64.decode'}](Text: string) -> string, | ||
| BreakAllLinks: () -> (), | ||
| BreakLink: (LinkNumber: number) -> (), | ||
| CSV2List: (Text: string) -> {string}, | ||
| CastRay: (Start: vector, End: vector, Options: list) -> {any}, | ||
| Ceil: (Value: number) -> number, | ||
| Char: (value: number) -> string, | ||
| Char: @[deprecated {reason="Use 'utf8.char' or 'string.char' instead."}](value: number) -> string, | ||
| ClearCameraParams: () -> (), | ||
| ClearLinkMedia: (Link: number, Face: number) -> number, | ||
| ClearPrimMedia: (Face: number) -> number, | ||
|
|
@@ -502,7 +502,7 @@ declare ll: { | |
| DeleteCharacter: () -> (), | ||
| DeleteKeyValue: (Key: string) -> uuid, | ||
| DeleteSubList: <T>(Source: {T}, Start: number, End: number) -> {T}, | ||
| DeleteSubString: (Source: string, Start: number, End: number) -> string, | ||
| DeleteSubString: @[deprecated {use='string.sub'}](Source: string, Start: number, End: number) -> string, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. takes byte index rather than codepoint index |
||
| DerezObject: (ID: uuid, flags: number) -> boolean, | ||
| DetachFromAvatar: () -> (), | ||
| DetectedDamage: @[deprecated {use='getDamage'}](Number: number) -> {any}, | ||
|
|
@@ -662,7 +662,7 @@ declare ll: { | |
| GetStartString: () -> string, | ||
| GetStaticPath: (Start: vector, End: vector, Radius: number, Parameters: list) -> {any}, | ||
| GetStatus: (StatusFlag: number) -> boolean, | ||
| GetSubString: (String: string, Start: number, End: number) -> string, | ||
| GetSubString: @[deprecated {use='string.sub'}](String: string, Start: number, End: number) -> string, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. takes byte index rather than codepoint index |
||
| GetSunDirection: () -> vector, | ||
| GetSunRotation: () -> quaternion, | ||
| GetTexture: (Face: number) -> string, | ||
|
|
@@ -774,7 +774,7 @@ declare ll: { | |
| OffsetTexture: (OffsetS: number, OffsetT: number, Face: number) -> (), | ||
| OpenFloater: (floater_name: string, url: string, params: list) -> number, | ||
| OpenRemoteDataChannel: @deprecated () -> (), | ||
| Ord: (value: string, index: number) -> number, | ||
| Ord: @[deprecated {reason="Use 'utf8.codepoint' or 'string.byte' instead."}](value: string, index: number) -> number, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't find an issue with ord:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Takes byte index rather than codepoint index: |
||
| OverMyLand: (ID: uuid) -> boolean, | ||
| OwnerSay: (Text: string) -> (), | ||
| ParcelMediaCommandList: (CommandList: list) -> (), | ||
|
|
@@ -807,7 +807,7 @@ declare ll: { | |
| RemoveVehicleFlags: (Vehiclelags: number) -> (), | ||
| ReplaceAgentEnvironment: (agent_id: uuid, transition: number, environment: string | uuid) -> number, | ||
| ReplaceEnvironment: (position: vector, environment: string | uuid, track_no: number, day_length: number, day_offset: number) -> number, | ||
| ReplaceSubString: (InitialString: string, SubString: string, NewSubString: string, Count: number) -> string, | ||
| ReplaceSubString: @[deprecated {use='string.gsub'}](InitialString: string, SubString: string, NewSubString: string, Count: number) -> string, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not equivilant if the pattern contains regex characters |
||
| RequestAgentData: (AvatarID: uuid, Data: number) -> uuid, | ||
| RequestDisplayName: (AvatarID: uuid) -> uuid, | ||
| RequestExperiencePermissions: (AgentID: uuid, unused: string) -> (), | ||
|
|
@@ -933,10 +933,10 @@ declare ll: { | |
| StopMoveToTarget: () -> (), | ||
| StopObjectAnimation: (Animation: string | uuid) -> (), | ||
| StopSound: () -> (), | ||
| StringLength: (Text: string) -> number, | ||
| StringToBase64: (Text: string) -> string, | ||
| StringLength: @[deprecated {reason="Use 'utf8.len' or '#' or 'string.len' instead."}](Text: string) -> number, | ||
| StringToBase64: @[deprecated {use='llbase64.encode'}](Text: string) -> string, | ||
| StringTrim: (Text: string, TrimType: number) -> string, | ||
| SubStringIndex: (Text: string, Sequence: string) -> number?, | ||
| SubStringIndex: @[deprecated {use='string.find'}](Text: string, Sequence: string) -> number?, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. returns byte index rather than codepoint index |
||
| TakeCamera: @[deprecated {use='ll.SetCameraParams'}](AvatarID: uuid) -> (), | ||
| TakeControls: (Controls: number, Accept: boolean | number, PassOn: boolean | number) -> (), | ||
| Tan: (Theta: number) -> number, | ||
|
|
@@ -948,8 +948,8 @@ declare ll: { | |
| TeleportAgentGlobalCoords: (AvatarID: uuid, GlobalPosition: vector, RegionPosition: vector, LookAtPoint: vector) -> (), | ||
| TeleportAgentHome: (AvatarID: uuid) -> (), | ||
| TextBox: (AvatarID: uuid, Text: string, Channel: number) -> (), | ||
| ToLower: (Text: string) -> string, | ||
| ToUpper: (Text: string) -> string, | ||
| ToLower: @[deprecated {use='string.lower'}](Text: string) -> string, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
print(string.lower("CAFÉ")) -- > cafÉ
print(ll.ToLower("CAFÉ")) -- > café
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds like maybe |
||
| ToUpper: @[deprecated {use='string.upper'}](Text: string) -> string, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
print(string.upper("café")) -- > CAFé
print(ll.ToUpper("café")) -- > CAFÉ
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sounds like maybe |
||
| TransferLindenDollars: (AvatarID: uuid, Amount: number) -> uuid, | ||
| TransferOwnership: (AgentID: uuid, Flags: number, Params: list) -> number, | ||
| TriggerSound: (Sound: string | uuid, Volume: number) -> (), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find an issue with char:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to do a full spectrum check, as per the caveats I added on the wiki page for llChar
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrote a verification script:
llOrd(<surrogate>)returning0x3Fto the wiki: https://wiki.secondlife.com/wiki/LlOrdutf8.chardoes on the wiki: https://wiki.secondlife.com/wiki/LlChar