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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:36:32+00:00 2026-05-13T21:36:32+00:00

if you know the start and end positions in string from where to begin

  • 0

if you know the start and end positions in string from where to begin and end the search. For example –

string s = StringStringString

|S |t |r |i |n |g |S |t |r |i |n |g |S |t |r |i |n |g
 0  1  2  3  4  5  6  7  8  9  10 11 12 13 14 15 16 17

How would you find “tr” in the string specifying the the position to begin search is at index 6 and the position to end the search is index 9.

I’m trying a set a limit of search so it wouldn’t go beyond it.

  • 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-13T21:36:33+00:00Added an answer on May 13, 2026 at 9:36 pm

    If you really want to limit the length of the sequence that gets traversed (presumably because the string is very long compared to the interesting region), use std::search and pass it the corresponding iterators into the string.

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

Sidebar

Related Questions

I would like to know how to start and code a thread manager for
I have `a string example = this site holds all the examples from The
I'm looking for a way to calculate the start and end position of a
Let's say I've got a string blbl\nblbl etc . I know I should start
I'm trying to establish the start and end positions of a text selection of
Before I start know this: I am extremely new to Java and programming. How
1) I know the start point of the arrow and I know the endpoint.
I already know how to start a one new activity when you click a
Possible Duplicate: How to know if Process.Start() is successful? I have a process similar
I am struggling to know where to start when trying to assign ranks to

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.