That lends itself to other solutions though, if there's the political will to implement them.
To take an unpopular example: Iran
Iran provides food and shelter to all it's citizens, making sure everyone has their minimum needs met. They've combined this with strict laws against begging. If they see anyone begging on the street someone will come up to them and ask "Why are you begging? Do you have some basic need that's still unmet?"
Outcomes will range from: - Helping them with that need (if it's legitimate) - Directing them to getting some kind of job if they merely want more income (even if it's selling trivial knick knacks on the street) - Presumably there's penalties for repeat offenders