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 6751197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:53:54+00:00 2026-05-26T12:53:54+00:00

I am implementing a heuristic for splitting names up into relevant fields (I know

  • 0

I am implementing a heuristic for splitting names up into relevant fields (I know it would be easier to received them separated but I’m not). I need to remove all of the ‘.’ characters in the string first, and then split where there are spaces in the string.

Why isn’t this removing the ‘.’ in for example Mr. John Doe

public void SplitNamesAndRemovePeriods()
{
    char[] period = {'.'};
    nameInFull = nameInFull.TrimEnd(period);
    string[] allNames = nameInFull.Split(' ');
    PrintNames();
}

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-26T12:53:54+00:00Added an answer on May 26, 2026 at 12:53 pm

    TrimEnd removes all trailing occurrences of a set of characters specified in an array from the current String object.

    Try:

    public void SplitNamesAndRemovePeriods()
    {
        nameInFull = nameInFull.Replace(".", String.Empty);
        string[] allNames = nameInFull.Split(' ');
        PrintNames();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm implementing a A* search algorithm but I keep running into problems with the
implementing service something similar with tinyurl or bit.ly, I'm would like to expose service
Implementing the very first scala example I ran into some problems probably tipical for
When implementing a Matrix construct using arrays, which would be more efficient? Using a
Im implementing NFS and almoste done but the RFC section 3.3.8 says this in
Implementing agile in projects requires the ability to do refactoring. It is not really
Implementing Interface just provide the skeleton of the method. If we know the exact
I`m implementing a custom filesystem on Ubuntu using Fuse, but I need to trap
Implementing nested subcommands in Python with cmdln. I'm not sure I'm using the right
When implementing a factory or simple factory, what would go against using a Type

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.