Group Abstract Group Abstract

Message Boards Message Boards

2
|
3.5K Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

How to test if a System`symbol is an Option used for a System`function?

Posted 3 years ago

What I have figured out so far is this:

Option[s_String] :=  {s, Length@Options[s] +    
  Length[SyntaxInformation[Symbol[s]]] };

Am not including functions that are actually options.

After removing values > 0, I get the list in the attached notebook.

Attachments:
POSTED BY: Andrew Meit
2 Replies
Posted 3 years ago

Thank you! Off to explore...

POSTED BY: Andrew Meit

This WFR function is probably useful in this context:

https://resources.wolframcloud.com/FunctionRepository/resources/SymbolsWithOption/

In[42]:= ResourceFunction["SymbolsWithOption"][IgnoreCase]
Out[42]= {"DamerauLevenshteinDistance", "DictionaryWordQ", \
"EditDistance", "FileNames", "Find", "FindList", "GrammarApply", \
"GrammarRules", "HammingDistance", "LongestCommonSequence", \
"LongestCommonSequencePositions", "LongestCommonSubsequence", \
"LongestCommonSubsequencePositions", "LongestOrderedSequence", \
"Names", "NeedlemanWunschSimilarity", "NotebookFind", \
"SequenceAlignment", "SmithWatermanSimilarity", "StringCases", \
"StringContainsQ", "StringCount", "StringDelete", "StringEndsQ", \
"StringFreeQ", "StringMatchQ", "StringPosition", "StringReplace", \
"StringReplaceList", "StringSplit", "StringStartsQ", "StringTrim", \
"WolframAlpha", "WolframAlphaResult"}
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard