[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 203
  • Last Modified:

Copying a string

I was wondering if I can copy a string to another string without having it be set to a different string. Here is an example:

string dividend;

...

dividend = removeLeadingZeros(dividend);

If I do something like this:

string divTemp;

divTemp = removeLeadingZeroes(dividend);
console.write(divtemp);

Then it will display correctly. But I don't want to declare a separate string.
0
igor92128
Asked:
igor92128
1 Solution
 
hongjunCommented:
dividend = removeLeadingZeros(dividend); will set to the same string.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now