Ask Question Sign In Sign Up
Home
Sign In
Sign Up
  • Home
  • >
  • Ruby
  • >
  • Add a space function in Ruby
PHP JavaScript C/C++ Golang Java Python SQL Ruby Kotlin Swift Other
Category
PHP
JavaScript
C/C++
Golang
Java
Python
SQL
Ruby
Kotlin
Swift
Other

Add a space function in Ruby

Member

letha

by letha , in category: Ruby , a year ago

Add a space function in Ruby 😃

1
2
3
4
5
6
7
def space(n)
    str = ''
    n.times do
      str += ' '
    end
    str
  end


Facebook Twitter LinkedIn Telegram Whatsapp Pocket

no answers

Related Threads:

How to check password validation in javascript

Render Javascript directly from PHP code

Add Zeroes Function in Ruby

Sum All Order function in Ruby

Add items to list one by one in Java

Render content directly from Yii controller in PHP

About us

  • Contact us
© 2023 Copyright: crapcodes.com

This Site is Created By mywebforum.com

Get Your Own Questions & Answers platform