Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

triming text off a string from right

Status
Not open for further replies.

MJB3K

Programmer
Jul 16, 2004
524
GB
Hi. i am developing this chatroom app, and some rooms will be password protected. The rooms that are password protected will have a (P) after the name. i was wondering, how to remove the (P) from the string??

e.g. Private Room (P) >> Private Room

^^ Removing the (P)

any ideas??


Regards,

Martin

Gaming Help And Info:
 
Try this:

arg = "Private Room (P)";
ArgArray = arg.split("(P)");
result = ArgArray[0];

-> "result" now contains "Private Room "
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top