PowerShell's string module in TypeScript


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/23 shipped • 4 next 78%

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

PowerShell 7.4 · Catalog source: manual inventory https://learn.microsoft.com/dotnet/api/system.string

82% shipped
18/22 shipped 4 next 1 explicit non-goals
Shipped (18)
  • Contains
  • EndsWith
  • IndexOf
  • Insert
  • LastIndexOf
  • Length
  • PadLeft
  • PadRight
  • Remove
  • Replace
  • Split
  • StartsWith
  • Substring
  • ToLower
  • ToUpper
  • Trim
  • TrimEnd
  • TrimStart

Next

Most System.String methods are strong plain-value portability targets.

  • CompareTo
  • Equals
  • ToLowerInvariant
  • ToUpperInvariant
Explicit non-goals (1)
  • Clone Skip Clone adds little value for immutable JS strings.

« More PowerShell functions