Find Longest Word

Find the longest word in a string.

Code

General
str.split.max_by(&:length)

Parameters

The string to search

Server

More Ruby Snippets