Search
 
SCRIPT & CODE EXAMPLE
 

RUBY

ruby capitalize first character of sentence

a = "apples and oranges are two diffERent Fruits."
a.split.each{|i| i.capitalize!}.join(' ')

=> "Apples And Oranges Are Two Different Fruits."
Comment

PREVIOUS NEXT
Code Example
Ruby :: rails difference in minutes between 2 datetime 
Ruby :: substring replace in ruby 
Ruby :: rails logger color 
Ruby :: ruby exponent 
Ruby :: ruby trim spaces 
Ruby :: require relative ruby 
Ruby :: rails find_by order 
Ruby :: full error messages rails 
Ruby :: rails crud 
Ruby :: ruby get decimal 
Ruby :: rails array sort 
Ruby :: convert string to date ruby 
Ruby :: ruby array unshift 
Ruby :: ruby loop through array 
Ruby :: ruby iterate over strings 
Ruby :: ruby hash delete 
Ruby :: ruby activerecord find where less than 
Ruby :: ruby rails delete all of a model in console 
Ruby :: Rails public folder items not available in production 
Ruby :: ruby on rails scaffold generator example with belongs to relationship 
Ruby :: rails increment counter model 
Ruby :: ruby name parameters 
Ruby :: rails many to many relationship same model 
Ruby :: ruby rspec change matcher 
Ruby :: How to handle permission in rails 
Ruby :: devise trackable not working for authentication 
Ruby :: after_create for STI rails 
Ruby :: add key and value to the beginning of a hash ruby 
Ruby :: ruby array join 
R :: check type of column in r 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =