PowerShell's string module in TypeScript
- contains
- endswith
- indexof
- insert
- lastindexof
- length
- padleft
- padright
- remove
- replace
- split
- startswith
- substring
- tolower
- toupper
- trim
- trimend
- trimstart
We have 18 PowerShell functions so far - help us add more
Got a rainy Sunday afternoon and a taste for a porting puzzle?
- Get inspiration from PowerShell docs.
- Click "New file" in the appropriate folder on GitHub. This will fork the project to your account, directly add the file to it, and send a Pull Request to us.
We will then review it. If it's useful to the project and in line with our contributing guidelines your work will become part of Locutus and you'll be automatically credited in the authors section accordingly.
Upstream Surface Inventory 18/54 shipped • 35 next 33%
Namespace-level inventory for PowerShell 7.4: what we already ship, what we may still want,
and what we intentionally skip or keep.
System.String instance methods
34%
shipped
18/53 shipped
35 next
1 explicit non-goals
Shipped (18)
Next
Most System.String methods are strong plain-value portability targets.
charscomparecompareordinalcomparetoconcatcopycopytocreateemptyenumeraterunesequalsformatgetenumeratorgethashcodegetpinnablereferencegettypecodeindexofanyinternisinternedisnormalizedisnulloremptyisnullorwhitespacejoinlastindexofanynormalizeop_equalityop_implicitop_inequalityreplacelineendingsStringtochararraytolowerinvarianttostringtoupperinvarianttrycopyto
Explicit non-goals (1)
-
cloneClone adds little value for immutable JS strings.