Link to home
Create AccountLog in
Avatar of NevSoFly
NevSoFly

asked on

Is there a way to tell if a character in a string is a supset or subset?

Is there a way to tell if a character in a string is a supset or subset?
Avatar of kaufmed
kaufmed
Flag of United States of America image

Please elaborate.
Avatar of NevSoFly
NevSoFly

ASKER

My apologies I was using the wrong terminology.  I am trying to identify different parts of the expression  2x + 4y2. namely the 4y2 section, where the 2 at the end of the expression is an exponent (superscript).  It is possible that the 2 could also be a subscript in a different expression.

This part of the expression is displayed in a rich textbox and each character in it is assigned to an element in a string array using string.split().   I am attempting to writing a function to identify the different elements in the array (coefficient, variable and operator).  

I have identified everything except for the 2 and do not know how to proceed.

thanks for your time.
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
yes that would work but only if the previous token was a variable.  but this answer is the closest I found.