Skip to content

Rewrite your app in Rust, piece by piece, checked against the original at every step. Works with TypeScript, JavaScript, Python, Go, Ruby, Java, C, PHP, C#, Kotlin, PowerShell and Swift.

323 B
Raw Blame
module Slug
  # @param text [String]
  # @return [Integer]
  def size(text) = text.length

  extend self

  # @param text [String]
  # @return [String]
  def make(text) = text.downcase.gsub(/\s+/, "-")

  # @param text [String]
  # @return [String]
  def flip(text) = text.reverse

  private

  def helper(text) = text
end