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

  • SEARCH
  • Home
  • 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 6954565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:37:21+00:00 2026-05-27T14:37:21+00:00

I am having trouble cutting down my string. I have a windows form application

  • 0

I am having trouble cutting down my string. I have a windows form application that receives incoming data. So far the examples I have found all use char to locate. I need to have it search for the entire "*S" and not just one character of it.

I did find a way to get the index of the sting and trim from that point to the end (sting.remove). My problem is i need to trim the beginning. so a trim to index method would work but I haven’t found how to do that.

What i have is a bunch of data like

"ok \r\n *S 38773 get 3042"

What I need to do is locate the *S and remove everything from the beginning to the *S. Because the return is not always the same I cant use replace or remove methods. I cant predict what will come before the *S and the remaining data is dynamic.

Any examples on how to essentially trim start to the “*S” would be wonderful. Thank you.

  • 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-27T14:37:21+00:00Added an answer on May 27, 2026 at 2:37 pm
    string huh = "ok \r\n *S 38773 get 3042";
    string trimmed = huh.Substring(huh.IndexOf("*S"));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having trouble with grepping and cutting at the same time I have a file
I having trouble figuring out NSBundle & DocumentDirectory data, I have a Camera Picture
Having trouble linking the Stomp.framework into an iPhone SDK application. http://code.google.com/p/stompframework/ I follow the
Having trouble with proper regex for RewriteCond RewriteCond %{REQUEST_URI} !^/foo/ Works as expected, that
Having Trouble with Entity Framework. I have been populating EntityReferences with an EntityKey inorder
I having trouble in dividing the HTML frames. I have been using the following
Im having trouble reading from a CSV file final String DELIMITER = ,; Scanner
I am having trouble with IE7. I have a header, which is an IMG.
I'm running vim 7.3 on a Mac 10.7.2 and I'm having some trouble cutting
I'm having trouble with a dialog I created. It packs everything in cutting off

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.