Skip to main content

Module stringsort

Module stringsort 

Source
Expand description

String manipulation and sorting for zshrs

Direct port from zsh/Src/string.c and zsh/Src/sort.c

Provides:

  • String duplication and concatenation utilities
  • Locale-aware string comparison
  • Numeric-aware string sorting
  • Case-insensitive and backslash-ignoring comparison

Modules§

sort_flags
Sort flags

Functions§

appstr
Append a string to another, returning the result
bicat
Concatenate two strings
dupstring
Duplicate a string (equivalent to dupstring/ztrdup in C)
dupstring_wlen
Duplicate a string with a specified length
dupstrpfx
Duplicate a prefix of a string
natural_cmp
Natural sort comparison (numbers sorted numerically within strings)
sort_strings
Sort string slices with various options
strcasecmp
Case-insensitive comparison
strend
Get pointer to the last character of a string
strjoin
Join strings with a separator
strlower
Convert string to lowercase
strmetasort
Sort an array of strings with various options
strprefix
Check if string starts with prefix
strsplit
Split string by separator
strstr
Find first occurrence of substring
strsuffix
Check if string ends with suffix
strtrim
Trim whitespace from both ends
strupper
Convert string to uppercase
tricat
Concatenate three strings
zstrcmp
Compare two strings with various options