PlexPlaylistSync/app/utils/common.py
2025-07-08 19:17:18 +09:00

6 lines
204 B
Python
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

def str_is_empty(s: str) -> bool:
"""Check if a string is empty or contains only whitespace."""
if s is None:
return True
stripped = s.replace(" ", " ")
return not bool(stripped)