Skip to content

ngreimel/str2float

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

str2float

Setup

This is a coding exercise written in PHP to refactor the str2float() function. The method accepts a string and returns a string formatted with two decimal places.

Review and rewrite this function in a more direct, easier to understand, and precise manner.

In the project directory, run

composer install

To run the test suite, run

composer test

Bonus

The current implementation has at least 2 identified bugs. Fix and test using

composer test-bug1
composer test-bug2
composer test-all

About

Coding exercise

Resources

Stars

Watchers

Forks

Languages