How to get the width of the CCEditBox text display?

I want to make the CCEditBox align center,but i don’t know how to get the width of the CCEditBox text display, is anyBody help me or any suggestion? Thanks~