"To live is to suffer, to survive is to find some meaning in the suffering." - Friedrich Nietzsche
The quote is not from any of Nietzsche's philosophical works it is from a letter to his sister, and is an encapsulation of his liking for Buddhist attitudes (though not the ideology) that life is suffering, but when understood suffering can be a source of will, the odd phrasing is because unlike Nietzsche himself his sister still held some Christian religious sensibilities which he chose to respect.