There's Base.isidentifier.  Be aware that it's not documented or exported, 
though.

julia> Base.isidentifier("1gh")
false

julia> Base.isidentifier("a_b1")
true


On Monday, May 23, 2016 at 3:17:55 PM UTC-4, vav...@uwaterloo.ca wrote:
>
> A macro I'm writing needs a function to check whether a string is a legal 
> variable name:
>
> islegalvariablename("a_b1")  => true
>
> islegalvariablename("1gh") => false
>
> I suppose this functionality must already be available somewhere?
>
> Thanks,
> Steve Vavasis
>
>
>

Reply via email to