Retrieve tab names? (not index)

Retrieve tab names? (not index)


How can i check if any of 5 tabs has the name "foo"?
(I mean the string between <span> and </span> in ui.tabs)
thanks