Skip to content

[Feature Request]: Add Slug Generation Feature #480

@arunimasingh26

Description

@arunimasingh26

Is there an existing issue for this?

  • I have searched the existing issues

Feature Description

The feature will convert a given string into a URL-friendly slug, using a combination of string manipulation and Unicode normalization.

It will perform as follows:

  • Convert the input string to lowercase.
  • Replace spaces with hyphens (-).
  • Remove accented characters and replace them with their non-accented equivalents.
  • Strip leading and trailing hyphens.
  • Remove any invalid characters (special characters) except alphanumeric characters and hyphens.
  • Handle edge cases such as multiple spaces, empty strings, and special characters.

For example:
"Where to find best cafés in Bhopal?" will be converted into "where-to-find-best-cafes-in-bhopal".

Record

  • I agree to follow this project's Code of Conduct
  • I want to work on this issue
  • I'm willing to provide further clarification or assistance if needed.

Full Name

Arunima Singh

Participant Role

SWOC'25 Contributor

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions