Skip to main content

A utility module for string manipulation, character encoding, sorting, and list operations.

Project description

sakthi_library

sakthi_library is a Python module that provides a collection of utility functions for string manipulation, character encoding, conversions, sorting, and list operations. It contains various custom functions designed to simplify common tasks.

Features

1. String Manipulation Functions

  • sakthi_show_it(*args, sep=' ', end='\n', file=None, flush=False): Custom print function with adjustable separators, file output, and flushing.
  • sakthi_clean_front_and_back(string): Removes leading and trailing whitespace from a string.
  • sakthi_clean_left(string): Removes leading whitespace from a string.
  • sakthi_clean_right(string): Removes trailing whitespace from a string.
  • sakthi_remove_prefix(string, prefix): Removes the specified prefix from a string.
  • sakthi_remove_suffix(string, suffix): Removes the specified suffix from a string.
  • sakthi_it_starts_with(string, prefix): Checks if the string starts with a given prefix.
  • it_ends_with(string, suffix): Checks if the string ends with a given suffix.
  • make_title(string): Converts the string to title case by capitalizing the first letter of each word.

2. Character Encoding Functions

  • sakthi_unicode_character(code_point): Retrieves the Unicode character for a given code point.
  • sakthi_character_to_ascii_code(character): Converts a character to its ASCII or UTF-8 encoded value.

3. Case Conversion Functions

  • sakthi_change_capital_A_B_C_D(string): Converts lowercase letters to uppercase.
  • sakthi_change_to_lowercase(string): Converts uppercase letters to lowercase.

4. Number and Character Conversion Functions

  • sakthi_to_ascii_values(string): Converts characters in a string to their ASCII values.
  • sakthi_to_hexadecimal_values(string): Converts characters in a string to their hexadecimal values.
  • sakthi_to_binary_values(string): Converts characters in a string to binary values.
  • sakthi_to_decimal_values(string): Converts characters in a string to decimal values.
  • sakthi_to_octal_values(string): Converts characters in a string to octal values.
  • sakthi_decimal_to_binary(decimal): Converts a decimal number to binary.
  • sakthi_decimal_to_octal(decimal): Converts a decimal number to octal.
  • sakthi_decimal_to_hexadecimal(decimal): Converts a decimal number to hexadecimal.
  • sakthi_binary_to_decimal(binary): Converts a binary number to decimal.

5. Sorting Functions

  • sakthi_arrange_ascending_order(arr): Sorts an array in ascending order using Timsort.
  • sakthi_arrange_descending_order(arr): Sorts an array in descending order using Timsort.

6. List and Range Functions

  • i_need_number_list(start, stop, step): Generates a list of numbers within a specified range and step.
  • how_many_elements_present(iterable): Returns the number of elements in an iterable.
  • sakthi_total_of_list(iterable, start=0): Calculates the sum of elements in a list with an optional starting value.
  • sakthi_min(list): Custom function to find the minimum value in a list.
  • sakthi_max(list): Custom function to find the maximum value in a list.

7. Print Formatting Utilities

  • sakthi_add_newline(string): Adds a newline after "sakthi" in a string.
  • sakthi_add_tab_space(string): Adds a tab space after "sakthi".
  • sakthi_backspace(string): Adds a backspace after "sakthi".
  • sakthi_add_vertical_tab(string): Adds a vertical tab after "sakthi".
  • sakthi_add_form_newline(string): Adds a form feed after "sakthi".
  • sakthi_sart_from_first(string): Starts from the first character of a string.

Installation

To install mymodule, clone the repository and use it in your Python projects.

git clone https://github.com/yourusername/mymodule.git

Usage

Here's an example of how you can use some functions from mymodule:

from mymodule import sakthi_show_it, sakthi_to_ascii_values

# Print using custom function
sakthi_show_it("Hello", "World", sep=", ")

# Convert string to ASCII values
ascii_values = sakthi_to_ascii_values("Hello")
print(ascii_values)

Contributing

Contributions are welcome! Please submit a pull request or open an issue if you find any bugs or want to add new features.

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

sakthiselvan-0.1.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

sakthiselvan-0.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file sakthiselvan-0.1.0.tar.gz.

File metadata

  • Download URL: sakthiselvan-0.1.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for sakthiselvan-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6fa465bea1c06548f7a873074e6a85b8008a4586cf2ca18d2b9f9a641e82b4ae
MD5 bc1fbf5aadfca84bcc4dbc0ad71b3d21
BLAKE2b-256 a91bf2f40a25f7c48fcd2835a0be100711d4ffbafd5edfd9f14e02782beaf612

See more details on using hashes here.

File details

Details for the file sakthiselvan-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sakthiselvan-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 caf728c3315e18d00ce7d4490afe800b2f70b09391e8c8e5942a7dca2d281a6f
MD5 ba34d587e7caaf0e83170fe55848d029
BLAKE2b-256 9e4c7b2ec9a9511bd0b0fdbb505c52ec99d4df4b02d1538e57f55e81d9965b96

See more details on using hashes here.

Supported by

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