Skip to main content

Adds a CSharp Style String Object, and namespace emulating much of the syntax C# uses to manipulate strings.

Project description

csharpstring

A general class that provides dot-net style syntax for python string manipulations.

Static & Instance Namespaces

To more easily separate the objective, from non-objective functionality there are two classes internally that can be used.

  1. csharpstring.instance
  2. csharpstring.static

Instance Methods

value1 = instance("The quick brown fox"); print(value1)

The quick brown fox

value2 = instance("jumped over the lazy dog"); print(value2)

jumped over the lazy dog

value3 = value1.Append(value2); print(value3)

The quick brown fox jumped over the lazy dog

value4 = value3.Substr(10,30);

brown fox jumped ove

value5 = value3.Replace("quick", "speedy"); print(value5)

The speedy brown fox jumped over the lazy dog

Static Methods

date = "10/31/22"; time = "8:30 PM"; print(static.Format("It is $0 on $1; do you know where your children are?", time, date)); print(static.Join(" ", value1, value2));

It is 8:30 PM on 10/31/22; do you know where your children are? The quick brown fox jumped over the lazy dog

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

csharpstring-0.0.3.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

csharpstring-0.0.3-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file csharpstring-0.0.3.tar.gz.

File metadata

  • Download URL: csharpstring-0.0.3.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for csharpstring-0.0.3.tar.gz
Algorithm Hash digest
SHA256 de1c79135b7c35af871fbe2e1278b5af7421eb5a6b12c1ebd137b9be541bb840
MD5 972c1ef9a358bffbb8fba0f462185c9a
BLAKE2b-256 7a6a783fb1ddc605dbbd7cf012e26e1a793776f4d7e8e9c4909ee1ccfc0aacd9

See more details on using hashes here.

File details

Details for the file csharpstring-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: csharpstring-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for csharpstring-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bf0de4757febbb83acac39f4b669cffffef7ebc58ed707a1e66dc6e576742ca6
MD5 a9d18e5ec5e8519d0290573418e027d1
BLAKE2b-256 33033342266f3af008625ed95a14500e6e219edf8ff600c486e4633a37cf42fb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page