# How to make some RowBox to be string

GeneralUtilitiesGetUsages["SystemSin"]


I want to get $\color{red}{\textbf{1}}$ plain string,but this function actually will give me some RowBox:

And the same case:

GeneralUtilitiesGetUsages["SystemPlot"]


I want to get $\color{red}{\textbf{4}}$ plain string from it:

{"Plot[f,{x,Subscript[x, min],Subscript[x, max]}] generates a plot of f as a function of x from Subscript[x, min] to Subscript[x,max].","Plot[{Subscript[f, 1],Subscript[f,2],…},{x,Subscript[x,min],Subscript[x, max]}] plots several functions Subscript[f,i].","Plot[{…,w[Subscript[f, i]],…},…] plots Subscript[f,i] with features defined by the symbolic wrapper w.","Plot[…,{x}∈reg] takes the variable x to be in the geometric region reg."}

Can any method do this?

• @Kuba I have,we can copy it as plain string to get it by right click. – yode Feb 24 '17 at 13:55

How can I get the unchanged Box form of an arbitrary expression?

toBoxes = MathLinkCallFrontEnd[
FrontEndUndocumentedTestFEParserPacket[#, True]
][[1]] &


How to convert arbitrary raw boxes directly into String?

toText = FrontEndExecute[
FrontEndExportPacket[#, "PlainText"]
][[1]] &


Composition[
Map[toText]
, Map[toBoxes]
, StringSplit[#[[1]], "\n"] &
] @ GeneralUtilitiesGetUsages["SystemPlot"]

{
"Plot[f,{x,Subscript[x, min],Subscript[x, max]}]generates a plot of \
f as a function of x from Subscript[x, min]to Subscript[x, max]."
,
"Plot[{Subscript[f, 1],Subscript[f, 2],\[Ellipsis]},{x,Subscript[x, \
min],Subscript[x, max]}]plots several functions Subscript[f, i]."
,
"Plot[{\[Ellipsis],w[Subscript[f, i]],\[Ellipsis]},\[Ellipsis]]plots \
Subscript[f, i]with features defined by the symbolic wrapper w."
,
"Plot[\[Ellipsis],{x}\[Element]reg]takes the variable x to be in the \
geometric region reg."
}

• Good lesson to me.Thanks a lot. – yode Feb 24 '17 at 14:06
• I'm shy to say I don't know the function of FrontEndUndocumentedTestFEParserPacket still.And the function of the True? – yode Feb 24 '17 at 15:12
• @yode I can't say more than you can find in the topic linked above. – Kuba Feb 24 '17 at 15:23