-
-
Save reuben-sutton/3957772 to your computer and use it in GitHub Desktop.
to_string.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######## | |
# Author: Henry Turner, Reuben Sutton | |
# Project: to_string | |
# Description: A speedy algorithm to convert a string to a string | |
# License: MIT | |
######## | |
def to_string | |
# process the string | |
new_string = "" | |
this_string_converted_to_a_string = "#{self.to_s}" | |
this_string_converted_to_a_string.each do |this_character_of_this_string_converted_to_a_string| | |
new_string << "#{this_character_of_this_string_converted_to_a_string.to_s}" | |
end | |
return new_string | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment