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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:09:35+00:00 2026-05-14T21:09:35+00:00

What is the opposite of String.charAt() ?? If I Have a string: var Str:String=Hello

  • 0

What is the opposite of String.charAt()??

If I Have a string:

var Str:String="Hello World";

How do I change the 5th character, for example, from a ‘ ‘ to an ‘_’?

I can GET the 5th character like this:

var C:String=Str.charAt(5);

But how do I SET the 5th character?

Thanks in advance.

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

    There are many ways to skin this cat. One, off the top of my head, would involve String.substr:

    var Str:String="Hello World"
    var newStr:String = Str.substr(0,5) + "_" + Str.substr(6);
    

    or, the same as above, but more generalized:

    function setCharAt(str:String, char:String,index:int):String {
        return str.substr(0,index) + char + str.substr(index + 1);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given a table-valued function such as dbo.Split() from T-SQL: Opposite to string concatenation -
I have collection of similar strings for example : string 1: Customer's first Name
I'm trying to make a method that returns a string of words in opposite
Note: This is the opposite direction to most similar questions! I have an iPhone
Is there a way to do the opposite of String.Split in .Net? That is,
Possible Duplicate: Split string in SQL I have seen a couple of questions related
I have a string containing a date, and another string containing the date format
I try to achive the opposite of here . I have an abstract class,
This question is the opposite of Header in gmail for thread hinting I have
I'm basically looking for the opposite of http_build_query() . I have the following as

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.