2

We're building a simple function that converts any string into lowercase alphanumeric characters and hyphens, e.g. "My Exciting 1st Example!" becomes "my-exciting-1st-example". This is specifically for creating URL parts.

I've previously called it "safe URL", but it's not technically a Unique Resource Location, and this spec certainly doesn't encompass the full set of safe URL characters. Given its common usage, is there a commonly used name for this state or process? Much like "alphanumeric" is a thing?

andrewb
  • 5,200
  • 6
  • 36
  • 54
  • 1
    The URL for this very question on Stack Overflow is a good example of this: `is-there-a-name-for-a-string-containing-only-lowercase-alphanumeric-characters-a` – Tim Biegeleisen Jan 22 '16 at 04:35
  • 1
    Actually, the term you're looking for is a slug: http://stackoverflow.com/questions/4230846/what-is-the-etymology-of-slug/4230937#4230937 – paxdiablo Jan 22 '16 at 04:52

1 Answers1

3

Those things are often called "slugs", and the process of making one would be to "slugify".

That's by no means universal, but I don't know of any other jargon for the concept.

References

Community
  • 1
  • 1
rici
  • 234,347
  • 28
  • 237
  • 341