Let's say Mario would be a retired soldier. What is the difference between these two(are they of the same meaning?)
Mario used to be a soldier.
Mario had been a soldier.
Thx in advance.
I'm going to swipe Lambie's example:
Mario used to be a soldier and is now a policeman.
Mario had been a soldier before he became a policeman.
There is no real difference in meaning between these sentences. They are just two ways of saying that something was true in the past, but isn't now.
I should add this is normally the case. There is a popular joke by the comedian Mitch Hedberg:
I used to do drugs ... I still do, but I used to, too.”
"Used to" strongly implies that you don't do that thing anymore, but it doesn't rule out the possibility that you still do that thing (or even that you ever stopped). This joke is funny because it defies this expectation.
In the same way, "had done" only describes the relationship of two events in time. It doesn't necessarily mean that you stopped for good.
I had been in a band before I graduated college, but I got back into it last year.
"Had done" doesn't really work in the Hedberg joke, because you'd have to explain what event caused you to stop, and because it does imply that you actually did stop, at least for a time.