You're probably thinking of this Anatole France[0] quote:
βThe law, in its majestic equality, forbids the rich as well as the poor to sleep under bridges, to beg in the streets, and to steal bread.β
[0] https://en.m.wikiquote.org/wiki/Anatole_France