Skip to content
  • Home
  • About Me
  • Contact
Dowst.Dev
Dowst.Dev
PowerShell Weekly
Dowst.Dev
Dowst.Dev
PowerShell Weekly
  • Home
  • About Me
  • Contact

Repeat a character

Matthew DowstMar 18, 2019Mar 29, 2019
"ha" * 5
Details
This will repeat the given string by the number given

Example
PS C:\> "ha" * 5

hahahahaha

Share this:

  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Reddit (Opens in new window) Reddit
  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
  • Email a link to a friend (Opens in new window) Email

<span class="nav-subtitle screen-reader-text">Page</span>

Previous PostAdd a line break to a string
Next PostRepeat a character inside another string

Related Posts

Quick and Easy Password Generator

This is a quick and easy password/random character generator. It...
Matthew DowstMay 7, 2021May 7, 2021

Parse Email Address

You can use this snippet to parse an email address...
Matthew DowstJun 4, 2020Jun 4, 2020

Properly Capitalize a Title Using PowerShell

Being married to someone who majored in English has made...
Matthew DowstOct 24, 2019Oct 24, 2019
  • About Me
  • Contact Me
  • PowerShell Weekly Archive
Copyright © 2026 - Yuki Westa Blog Theme By WP Moose