This is answer is self evaluation of what I think happened to me.
I don't know about building characters to be 'stronger'. (What does 'stronger' or 'better' even mean here? What is the partial order?). But I do think it influences character.
I recently graduated from my BSc in mathematics and I can guarantee that I'm much more honest now that I graduated than what I was before I got into mathematics. I think it was because I studied mathematics. I sort of got obsessed with the truth, something that its in the core of mathematics, and telling a lie, even if it is the polite or politically correct thing to do, makes me cringe inside. I have become brutally honest.
How exactly is this a consequence of studying mathematics, I can't really explain, but as I said before, the 'search for truth' is something that pervades through all of mathematics and not in other sciences. 'Facts' change all the time in other sciences, but not in mathematics.
Added much later: In this documentary about Perelman (see how the english subtitles came to be here), at 31:47 it can be read
Perelman's "teachers insisted that mathematics is not only the Queen of Sciences, but also the most moral science."
The next few moments after the given time mark are also relevant.