Skip to content
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

Extra string utility expressions #1860

Closed
TheBentoBox opened this issue Jan 29, 2019 · 0 comments
Closed

Extra string utility expressions #1860

TheBentoBox opened this issue Jan 29, 2019 · 0 comments
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).

Comments

@TheBentoBox
Copy link
Member

TheBentoBox commented Jan 29, 2019

Description

It would be good to have a few more utility string expressions and improvements to existing ones. For example, an expression which returns text with just the first character capitalized, or the first character of each word. If we want to go fully customizable, the expression(s) should be able to:

  • Return the same string with JUST the first letter capitalized.
  • Return the same string with the first character of each word capitalized.
  • Do both of the above with or without modifying the capitalization of all other characters.

Just som general suggestions:

  1. In ExprStringCase the space between (upper|lower) and case should be optional as both spellings are correct. We should also support an additional pattern of (upper|lower)[ ]case %string%, and perhaps the expression could accept multiple strings. I'm sure users have previously assumed we don't have an upper/lowercase string expression because the current patterns are pretty lacking.
  2. If I had to guess I'd personally expect capitalized %string% (which again could accept multiple strings) to return the string with only the first letter capitalized like discussed above. Right now it's just an alias for in upper case.
  3. We could add another pattern (pascal|title) case[d] %string% which returns the string with the first letter in each word capitalized. On my server I have this same custom expression but as (|1¦lenient) pascal cased %string%, and if lenient (if parse mark is 1) it doesn't affect capitalization of letters other than the first ones. The same optional leniency could be applied to capitalized.
@TheBentoBox TheBentoBox added enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements). labels Jan 29, 2019
@Wealthyturtle Wealthyturtle added the completed The issue has been fully resolved and the change will be in the next Skript update. label Oct 26, 2019
@Wealthyturtle Wealthyturtle reopened this Dec 22, 2019
@bensku bensku closed this as completed Jan 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).
Projects
None yet
Development

No branches or pull requests

3 participants