salmanahmad / dog

The Dog Programming Language
http://www.dog-lang.org
Apache License 2.0
0 stars 0 forks source link

v0.4 lib string #41

Closed ychen022 closed 11 years ago

salmanahmad commented 11 years ago

Some changes to the API:

Add these functions:

string.split:using_separator:
string.character_at_index:from:

Rename these functions:

string.contains:substring: --- string.does:contain:
string.difference:from: --- string.difference_between:and:
string.ends_with:suffix: --- string.does:end_with:
string.index_of:search: --- string:index_of:in:
string.last_index_of:search: --- string.last_index_of:in:
string.substring:starting:ending: --- string.substring:from_index:to_index:
string.remove:substring: --- string.remove_substring:from:
string.starts_with:prefix: --- string.does:start_with:
string.replace:search:replace_with: --- string.replace_all:with:in:
string.replace_once:search:replace_with: --- string.replace_first:with:in:
string.is_alphanumeric_space: --- string.is_alphanumeric_or_space:
string.is_alpha_space: --- string.is_alpha_or_space:
string.left:length: --- string.left_string_of:with_length:
string.left_pad:length: --- string.left_pad:with_length:
string.right:length: --- string.right_string_of:with_length:
string.right_pad:length: --- string.right_pad:with_length:

These are awesome:

string.chomp:
string.delete_whitespace:
string.is_all_lower_case:
string.is_all_upper_case:
string.is_alpha:
string.is_alphanumeric:
string.is_blank:
string.length:
string.lower_case:
string.repeat:times:
string.reverse:
string.strip:
string.upper_case:
salmanahmad commented 11 years ago

I added the coding conventions here: Conventions.