Skip to content

Method which receives a string, filter it and the returns a output String

Notifications You must be signed in to change notification settings

dani4sfc/StringConverter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StringConverter

Method which receives a string, filter it and the returns a output String

Basically, we have a interface which one method. We implement that interface on a service implementation. There we have all the logic, We check the Period with an array which contains the 5 possible Periods, if the period doesn't match, return an "Invalid". After, we check the rest of the string, separating seconds and miliseconds, calculating plus time and setting it. Finally, we return the period string, plus " - " plus the time String.

IMPORTANT!-

In order to check properly the funcionality, there are 3 variables (String param) on the main class, you can edit them and use the one you prefer in order to check what output the program brings you, depending on the input.

About

Method which receives a string, filter it and the returns a output String

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages