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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:48:24+00:00 2026-06-05T12:48:24+00:00

I want to similar a Tamil keyboard Function: when I press the A button,

  • 0

I want to similar a Tamil keyboard

Function: when I press the A button, I want show அ and when I press AA I want to show ஆ.

This is what I’ve tried so far.

NSMutableString *updatedText = [[NSMutableString alloc] initWithString:textView.text];
[updatedText insertString:text atIndex:range.location];
NSLog(@"%i",range.location);
NSRange replaceRange = range , endRange = range;

if (text.length > 0) 
{
    NSLog(@" text length %i",text.length);

    replaceRange.length= text.length;
} 
else 
{
    replaceRange.length = 2;  // length of "hi" is two characters
    replaceRange.location -= 1; // look back one characters (length of "hi" minus one)
}

   int replaceCount = [updatedText replaceOccurrencesOfString:@"a" withString:@" அ" options:NSCaseInsensitiveSearch range:replaceRange];

   //   replaceCount = [updatedText replaceOccurrencesOfString:@"aa" withString:@" ஆ" options:NSCaseInsensitiveSearch range:replaceRange];

if (replaceCount >=1) {
    // update the textView's text
    textView.text = updatedText;

   // leave cursor at end of inserted text
    endRange.location = text.length+ replaceCount*100000000; // length diff of "hello" and "hi" is 3 characters
//  endRange.location;
    NSRange h= endRange;

   textView.selectedRange= h; 

    [updatedText release];
    return NO;
}    
[updatedText release];

return YES;     
}

If I use this method, it only reads a single character and it replaces that character with a space.

  • 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-06-05T12:48:27+00:00Added an answer on June 5, 2026 at 12:48 pm

    If you want to replace all of “a” to “அ” and “aa” to “ஆ”
    Do the following
    First test for “aa”

    //this will repleace all of "aa"
    int replaceCount = [updatedText replaceOccurrencesOfString:@"aa" withString:@"ஆ" options:NSCaseInsensitiveSearch range:[NSMakeRange(0, updatedText.length)];
    
    //this will repleace all of "a"
    int replaceCount = [updatedText replaceOccurrencesOfString:@"a" withString:@"அ" options:NSCaseInsensitiveSearch range:[NSMakeRange(0, updatedText.length)];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Express JS and I want a functionality similar to Django's reverse function.
We have a database of hundreds urls which we want to show similar content
I want a similar behavior of confirm delete option in ASP.Net Gridview, as this
I have a function that drop pin with this code: ParkPlaceMark *placemark=[[ParkPlaceMark alloc] initWithCoordinate:location];
I want something similar to this post but with Visual Studio. This would be
I have a list of activity stream items where I want similar items to
I want wiki similar to Github Wiki but Github Wiki is repository specific and
I seen dialogs returning results: if some_dlg.ShowModal() = wx.OK I want a similar behavior
Questions : I want to implement similar look and feel of the title bar
I am using Avalon in my WPF app. I want a window similar 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.