![]() S:=gettoken(a,'-',4) //will return string "dr", which is the 4th token in the string. N:=gettokencount(a,'-') //this will return integer value 6 which mean 6 token are available in the string. "separador" mean the string used as separator. "cadena" mean the string where you want to search for tokens, Hi have one like that it in my utils libs įunction GetTokenCount(Cadena,Separador:string):integer Įlse Result:=Copy(Cadena,1,Posicion-Length(Separador)) įunction GetToken(Cadena,Separador:string Token:integer):st ring The site has recently been migrated to new hosting, so if you notice anything that doesn't appear to be quite right please drop an email to me at athena at outer hyphen reaches dot com or post in this thread. ![]() If this happens an error message will be displayed (you should note this and report it in the 'Site News/Feedback' forum. You will not be able to see posts that you have made that are waiting to be moderated.ĭo not think that because your post has not appeared that an error has occurred. Available since, at least, Turbo Pascal 1. When you post to these areas, you will be told that your post is awaiting moderation. What is classical way to split a string in Pascal The really 'classic' way is repeatedly calling Pos(), Copy() and Delete() until you're left without string. ![]() For: sdcsds sd aCamelCaseWord as dasd as aSscdcacdcdc PascelCase DfsadSsdd sd Outputs: 48: PascelCase 59: DfsadSsdd. Since this appears to be a problem, please be aware that some areas of the site are moderated. Check that a non-word character comes at the beginning of your regex with \W and keep the individual strings together, then split the words. This is required for automatic promotions to work and to ensure your account is not deleted during the registration process. If you have recently signed up, please make sure you log in so that your activity is registered. You have to register before you can post. If this is your first visit, be sure to check out the FAQ by clicking the link above. SplitString will split the string ( S) using the characters in Delimiters as separator characters.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |