I am trying to split a string that is a complex number into real and imaginary number.
I tried to find the solution on the internet, but all of the solutions that I found remove the splitting character.
I will show on example what exactly I want to do:
I have a string that is in this form : -3.5+6.7i
I want to split the string into -3.5 and +6.7i
Thanks for the help!!!
NSRegularExpressionandNSScannerare the primary framework-provided ways to parsing/breaking up strings.