Skip to content

Conversation

@Burbulinis
Copy link
Member

@Burbulinis Burbulinis commented Jul 3, 2025

Problem

The current implementation of the indices of expression always performs case-sensitive string comparisons, without the ability to do otherwise.

Solution

This PR updates the behaviour so that string comparisons now follow the case sensitive option defined in Skript's configuration. As well, it updates usage of the old @Examples annotation to @Example and adds utility methods to StringUtils.

Testing Completed

I don't believe there is a good way to test this. Manual testing has confirmed this works properly.

Supporting Information

Prior to the updates to this expression, index of string in string always used case-sensitive comparisons, so existing scripts that relied on that behaviour may now break if the case sensitive node is false in the configuration.


Completes: none
Related: none

@Burbulinis Burbulinis requested a review from a team as a code owner July 3, 2025 01:28
@Burbulinis Burbulinis requested review from Efnilite and removed request for a team July 3, 2025 01:29
@Burbulinis Burbulinis added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Jul 3, 2025
@Burbulinis Burbulinis requested a review from cheeezburga July 3, 2025 01:29
@skriptlang-automation skriptlang-automation bot added the needs reviews A PR that needs additional reviews label Jul 3, 2025
@Burbulinis Burbulinis requested a review from sovdeeth July 3, 2025 01:36
@sovdeeth sovdeeth moved this to In Review in 2.12 Releases Jul 3, 2025
Copy link
Member

@Efnilite Efnilite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks nice

@skriptlang-automation skriptlang-automation bot removed the needs reviews A PR that needs additional reviews label Jul 3, 2025
@Burbulinis Burbulinis requested a review from Efnilite July 3, 2025 14:12
@github-project-automation github-project-automation bot moved this from In Review to Awaiting Merge in 2.12 Releases Jul 3, 2025
@skriptlang-automation skriptlang-automation bot added the feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. label Jul 3, 2025
@Burbulinis
Copy link
Member Author

I have also renamed the expression from Indices Of to Indices of Value. This is done because I believe there could be confusion between the expression Indices of List which returns the indices of a list or sorted.

@Burbulinis Burbulinis changed the title Add case sensitivity support to ExprIndicesOf Add case sensitivity support to ExprIndicesOf & Cleanup Jul 4, 2025
@APickledWalrus APickledWalrus merged commit c9b2222 into SkriptLang:dev/feature Jul 8, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from Awaiting Merge to Done in 2.12 Releases Jul 8, 2025
@skriptlang-automation skriptlang-automation bot added completed The issue has been fully resolved and the change will be in the next Skript update. and removed feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. labels Jul 8, 2025
Burbulinis added a commit to Burbulinis/Skript that referenced this pull request Jul 9, 2025
erenkarakal pushed a commit to erenkarakal/Skript that referenced this pull request Nov 26, 2025
erenkarakal pushed a commit to erenkarakal/Skript that referenced this pull request Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update.

Projects

No open projects
Status: Done - Released

Development

Successfully merging this pull request may close these issues.

4 participants