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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:10:33+00:00 2026-05-23T16:10:33+00:00

Im looking for a function that will enable me to find a certain string

  • 0

Im looking for a function that will enable me to find a certain string in a textRange and gives me back its textPointers(beginning and end)
whats the best approach or is there any textRange method that can help me ?
Thanks.

I have a problem in my approach which happens when i have same words in my textRange and im trying to get the Textpointer for each word in the textRange.

For example my text in the textRange is
“hello hello hello”
and i want to get the text pointer for each word in the textRange, it will mix the second and last word and give me (the first indexOf the word) or last depends on which method i use.

  • 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-23T16:10:33+00:00Added an answer on May 23, 2026 at 4:10 pm

    Something like this

    string txt = tr.Text; //tr is your TextRange
    string find = "a str";
    int beginPtr = txt.IndexOf(find);
    int endPrt = beginPtr + find.Length;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking for a function that will partition a list into fixed size
I'me looking for a function that would receive a time and would round it
Original Question I am looking for a function that attempts to quantify how distant
I am not that familiar with Javascript, and am looking for the function that
I'm looking to implement a function that retrieves a single frame from an input
I am looking to write a function like ref String TestIt( int index )
I'm looking for a semantic or language construct that will simplify some of my
Is there a jQuery equivalent to prototype's defer? I'm looking for something that will
Looking for a nifty helper function/method for grepping through all defined tables, columns, stored
I'm looking for a method (or function) to strip out the example.ext part of

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.