Skip to content

Dwashi2/swift-PartiallyHiddenString

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

swift-PartiallyHiddenString


Swift Study

Project to study Swift

Table of Contents
  1. About The Project
  2. Getting Started
  3. Contact

About The Project

  Create a function that takes a phrase and transforms each word using the following rules:
  
  Keep first and last character the same.
  Transform middle characters into a dash -.
  
  Examples:
  partiallyHide("skies were pretty") ➞ "s---s w--e p----y"
  partiallyHide("red is not my color") ➞ "r-d is n-t my c---r"
  partiallyHide("She rolled her eyes") ➞ "S-e r----d h-r e--s"
  partiallyHide("Harry went to fight the basilisk") ➞ "H---y w--t to f---t t-e b------k"
  
  Notes:
  Words with two or fewer letters should not be hidden at all.

  Excercise from: https://edabit.com/challenges/swift

Getting Started

Open the file PartiallyHiddenString.xcodeproj

Prerequisites

  • Xcode 12.4
  • Use iPhone 12 mini as simulator

Contact

Daniel Washington Ignacio - danielvertigo@hotmail.com

Click to access my LinkedIn

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages