Skip to content

Switch to unicase's to_folded_case#14255

Merged
sholderbach merged 1 commit intonushell:mainfrom
132ikl:unicase-casefold
Nov 5, 2024
Merged

Switch to unicase's to_folded_case#14255
sholderbach merged 1 commit intonushell:mainfrom
132ikl:unicase-casefold

Conversation

@132ikl
Copy link
Copy Markdown
Member

@132ikl 132ikl commented Nov 5, 2024

Description

Switch to_folded_case to a proper case fold instead of str::to_lowercase now that unicase exposes its to_folded_case method.

Rel: #10884, seanmonstar/unicase#61

User-Facing Changes

Case insensitive sorts now do proper case folding.

Old behavior:

[dreißig DREISSIG] | sort -i
# => ╭───┬──────────╮
# => │ 0 │ DREISSIG │
# => │ 1 │ dreißig  │
# => ╰───┴──────────╯

New behavior:

[dreißig DREISSIG] | sort -i
# => ╭───┬──────────╮
# => │ 0 │ dreißig  │
# => │ 1 │ DREISSIG │
# => ╰───┴──────────╯

Tests + Formatting

  • 🟢 toolkit fmt
  • 🟢 toolkit clippy
  • 🟢 toolkit test
  • 🟢 toolkit test stdlib

After Submitting

N/A

@sholderbach sholderbach added notes:mention Include the release notes summary in the "Hall of Fame" section notes:breaking-changes This PR implies a change affecting users and has to be noted in the release notes labels Nov 5, 2024
@sholderbach
Copy link
Copy Markdown
Member

Thanks for picking this thread back up!

@sholderbach sholderbach merged commit 7a7df3e into nushell:main Nov 5, 2024
@github-actions github-actions bot added this to the v0.100.0 milestone Nov 5, 2024
NotTheDr01ds pushed a commit to NotTheDr01ds/nushell that referenced this pull request Nov 8, 2024
# Description
Switch `to_folded_case` to a proper case fold instead of
`str::to_lowercase` now that unicase exposes its `to_folded_case`
method.

Rel: nushell#10884, seanmonstar/unicase#61

# User-Facing Changes

Case insensitive sorts now do proper case folding.

Old behavior:

```nushell
[dreißig DREISSIG] | sort -i
# => ╭───┬──────────╮
# => │ 0 │ DREISSIG │
# => │ 1 │ dreißig  │
# => ╰───┴──────────╯
```

New behavior:

```nushell
[dreißig DREISSIG] | sort -i
# => ╭───┬──────────╮
# => │ 0 │ dreißig  │
# => │ 1 │ DREISSIG │
# => ╰───┴──────────╯
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

notes:breaking-changes This PR implies a change affecting users and has to be noted in the release notes notes:mention Include the release notes summary in the "Hall of Fame" section

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants