Simple haskell string manage

Question :

Simple haskell string manage,

Answer :

Theres is a little problem I want to solve with Haskell:
let substitute a function that change all of the wildcards in a string for one concrete parameter. The function has de signature of:

subs :: String -> String -> String -> String  -- example:  -- subs 'x' "x^3 + x + sin(x)" "6.2" will generate  --          "6.2^3 + 6.2 + sin(6.2)"  

,

You could use the  package.

Your example might look something like this:

import Text.Regex(mkRegex, subRegex)    subs :: String -> String -> String -> String  subs wildcard input value = subRegex (mkRegex wildcard) input value  

That’s the answer Simple haskell string manage, Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.

Read More  Using Actionscript 3 to connect to a database

Disclaimer :

The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you