The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Hopefully a quick question..... :nervous:
What's the easiest way of getting a section of a string based upon an X specified delimiter? To show what I'm after, let's say that I have two strings that always contain the same number of delimters such as "X_Y_Z" and "A_B_C_D". The length of each of the parts might change (eg: "AAA_BB_C_DDDDD") but the number of delimeters don't. Now if a string is concatenated at the end of it such as "X_Y_Z_123" then I want to get "_123" including the underscore. If the string is "A_B_C_D_123_456" then I want to get "_123_456" out of it. If the string is "X_Y_Z" then I want a blank value. In the first string I would want to get from the 4th part onward and in the second string I want to get from the 5th part onward. Any thoughts? I know that I could turn the string into an array based upon the delimiter and then just say get from the X value onward if X isn't blank but then I'd have to concatenate all of the array values after X back together again. Hopefully I'm just thinking about it too much and that there's a quick way of getting the results. ![]() Thanks, |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|