Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 224219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:17:46+00:00 2026-05-11T19:17:46+00:00

I have created a function which will convert any string into tab delimited. What’s

  • 0

I have created a function which will convert any string into tab delimited.

What's new in ASP.NET 4.0

Then it will convert above title to following:

what-s-new-in-asp-net-4-0

I am using this to make my URL’s SEO’d. But I am not sure that it will work fine in all cases or not. Till now I have tested this function on around 1000 records in my database and its working fine for all titles. Guyz please check this function and let me know if there is possibility of failing this function, and if there is a possibility that this function may fail, then please tell me the correct function which I can use in my app.

public string SEO_makeTitle(object objTitle)
    {
        string strTitle = Convert.ToString(objTitle);

        strTitle = Regex.Replace(strTitle.Trim(), @"\W", " "); //replace special chars
        strTitle = Regex.Replace(strTitle.Trim(), @"\s{2,}", " "); //replace double space
        strTitle = strTitle.Trim().Replace(" ", "-").ToLower();

        return strTitle; //return - delimited title
    }

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:17:46+00:00Added an answer on May 11, 2026 at 7:17 pm

    You might want to consider what accents will look like. You’re replacing “special” characters, but I doubt that that includes non-ASCII letters.

    I would try to convert accented characters to non-accented ones first. There’s a relatively easy way to do this in C# if you know the trick:

     static string RemoveAccents (string input) 
     { 
         string normalized = input.Normalize(NormalizationForm.FormKD); 
         Encoding removal = Encoding.GetEncoding 
             (Encoding.ASCII.CodePage, 
              new EncoderReplacementFallback(""), 
              new DecoderReplacementFallback("")); 
         byte[] bytes = removal.GetBytes(normalized); 
         return Encoding.ASCII.GetString(bytes); 
     }
    

    You might also want to explicitly use ToLower(CultureInfo.InvariantCulture) to avoid problems if you run the code in Turkey. This probably wouldn’t be a problem if you run the ToLower before running RemoveAccents admittedly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 143k
  • Answers 143k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer At this time (Autocompleter 1.1pre), there isn't a way to… May 12, 2026 at 8:32 am
  • Editorial Team
    Editorial Team added an answer No way to do this in my experience. Had to… May 12, 2026 at 8:32 am
  • Editorial Team
    Editorial Team added an answer Ended up using "tc" in linux May 12, 2026 at 8:32 am

Related Questions

I have created a function which will convert any string into tab delimited. What's
Background I am working on a phonetic converter program which converts english text into
This might be a too bigger ask, but before I outsource it, I would
I need to add line breaks in the positions that the browser naturally adds
I have implemented the MOD 10 check digit algorithm using SQL, for the US

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.