hi. can anyone help me out with this?
i want to convert a string to an int, specifics of the int is not important. It does not have to be the ascii equivilant of it. I'm not sure the best way to approaching this.
Am working in Java, would it make sense to declare the string as an array of char and then loop through, pulling each char out and adding its ascii equivilant int to a running total?
How would i go about coding that. I'm a tad rusty!
edit: the outcome i want from this, is a number generated based on the string. that's all.
i want to convert a string to an int, specifics of the int is not important. It does not have to be the ascii equivilant of it. I'm not sure the best way to approaching this.
Am working in Java, would it make sense to declare the string as an array of char and then loop through, pulling each char out and adding its ascii equivilant int to a running total?
How would i go about coding that. I'm a tad rusty!
edit: the outcome i want from this, is a number generated based on the string. that's all.
Last edited:
