I can’t say that it’s unconstitutional. AFAIK the right to free speech means that you can express whatever ideas you want, but you can’t say it in an improper way.
It is unconstitutional based on a ruling in the The 2nd U.S. Circuit Court of Appeals in Manhattan in 2004 i forget the name of the case but unless they specifically specify what the foul language is by specifying the exact words that are an issue, it is considered to be infringement of free speech. also in a similar case State v. Samantha Elabanjo, a similar law was ruled to be unconstitutional.