Re: substr is not working.. Programming Web Development by wetube substr("$row1['j_des']", 0, 600); try this substr help Programming Databases by mamtha … to return only 99. I am using substr and instr functions but not getting what I…76767-99 [code=sql]select NVL (TRIM (SUBSTR (code, (INSTR (code, '_' ) ) + … Re: substr help Programming Databases by debasisdas Try the following sample code. [code]SELECT code,substr(code,instr(code,'-',1)+1,2) from table_name;[/code] substr Programming Software Development by YasaminKh Hi there, I'm working with a file. I want to write a code that returns a particular string located somewhere in the file. I have the starting position of the desired string and it's length so I thought that i can use substr(starting position, length of the string) but it doesn't work anybody has any idea to help me. I really appreciate it, substr problem Programming Software Development by Jennifer84 … understand why it works when I take the .substr away. The entire strings from the beginning are …40 characters so the characters that I am trying to substr do exist ? [code] std::vector<string>…i++) { One = ReadInData[i].substr(0, 2); Two = ReadInData[i].substr(3,2); Three = ReadInData[i].substr(6,4); NewData = Three … substr is not working.. Programming Web Development by jacob21 I m using substr in while loop. Using substr I am getting strike in Text; If I omit substr then I get perfect… result. I have to substr function; Is there any another …;div style="width:100%;"> <?php echo substr($row1['j_des'], 0,600).' ..........'; ?> </div> <… substr problem Programming Software Development by orwell84 I'm having a problem with the substr function. I want it to be dynamic in … for loop as follows: [code="perl"] for ($i = substr $bin, $sub, 1 ; $sub < $len2 ; $sub++){ [/code] … it to do. Is there a way to use substr for this? Is there a better way to do …what I'm trying to do, possibly without substr? Thanks in advance for any help. Re: substr problem Programming Software Development by Jennifer84 … (int i = 0; i < 10; i++) { One = ReadInData[i].substr(0, 2); [/code] [QUOTE=Duoas;605539]I see no error… substr() Causing Runtime Error Programming Software Development by ilikerps … getting a "Runtime Error!" when I use the substr() function, here: [CODE]char buffer[256]; int sr = …(buffer), 0); string buffStr = buffer; outfile << buffStr.substr(9,buffStr.size()-1) << "\n"; [/CODE…caused in the server, and it occurs only when the substr() function is used. I also have tried "buffStr… substr in mysql Programming Databases by niths hi all, i had a query and i need to substr that query. [CODE]@s ="select Emp_Id,First_Name,Last_Name,Gender,… [/CODE] my query is this now i used substr [CODE]set str1 = (SUBSTR(@s,-4));[/CODE] SO in str1 i am getting… Re: substr problem Programming Web Development by tnjiric …is to look at it this way: [B]substr(STRING_YOU_ARE_LOOKING_IN, starting_position, how_many_chars_from_starting_position);[/B] These positions are …search="Hello to all of you!"; echo substr($search,0,4); //this would print out "… the //end of the word //Example: echo substr($search, 3); //Considering that letter with index number… Re: substr is not working.. Programming Web Development by jacob21 [QUOTE=pzuurveen;1742622]a BLOB is not a string can't you use a VARCHAR you are just echo-ing it so a assume it's just a large text[/QUOTE] So.. There is any solution?; coz I have to use substr function.. there is any alternate function.. ? SubStr Command returns previous value in a space Programming Software Development by sadben.khan So the "substr" command is used for extracting certain characters, …i=0;i<line.length();i++) { stringstream(line.substr(i,1))>>character; cout<<character&…lt;<endl; } cout<<endl; stringstream(line.substr(12,1))>>character; cout<<character; … Re: substr() without breaking a word Programming Web Development by veedeoo …($str) <= $maxlen ) return $str; $newstr = substr($str, 0, $maxlen); if ( substr($newstr,-1,1) != ' ' ) $newstr = substr($newstr, 0, strrpos($newstr, " "… Re: substr() Causing Runtime Error Programming Software Development by ilikerps …"; buffer[sr] = '\0'; buffStr = buffer; outfile << buffStr.substr(9,buffStr.size()-1) << "\n"; [/CODE… Re: substr in mysql Programming Databases by smantscheff … " and" in your query use something like $query = substr($query, 0,length($query)-4) or whatever is appropriate in… substr problem Programming Web Development by decade … php. i would like to know how to use the substr() in this kind of problem. problem: I have this string… this: "Hello to ..." I try to use the substr how to obtain this kind of output but i dont… Re: substr problem Programming Web Development by Nyni Following code is ur ans. substr($stringA,0,8) means it take 0-8 character including space. <?php $stringA = "Hello to all of you!"; echo substr($stringA,0,8)." "."..."; ?> substr() without breaking a word Programming Web Development by mtho … to be understood. I have been trying to use the substr() function to show a the first few line of my… i've been trying to do it: <?php echo substr(nl2br($row_getPosts['entry']),0, 600); ?> Ive googled solutions and… Re: substr problem Programming Web Development by edwinhermann [QUOTE=tnjiric;1607096][CODE]echo substr($search,0,4); //this would print out "Hello"[/CODE][/QUOTE] Not quite. That would print out "Hell" (4 characters) substr for unicode content? Programming Web Development by sarithak hi frnds, i m using [B]substr[/B] for same like in english font.but, now i m using [B]unicode(telugu,hindi)[/B]...i m not getting wat i want(no.of letters)...also some letters are missing in a string..like this(హమీద్* అన్సా�)... plz give some suggesions wat i need to do.... Re: substr for unicode content? Programming Web Development by mschroeder You're probably looking for a multi-byte function. [url]http://php.net/manual/en/function.mb-substr.php[/url] substr is not showing the result Programming Web Development by Jiby_1 …<?php $answer = $listcareer['bigcontent']; $bigcontent = substr($answer,0,10); print_r($bigcontent); exit(); ?> Re: substr is not showing the result Programming Web Development by diafol $answer = $listcareer['bigcontent']; echo "Content of \$answer = $answer <br />"; $bigcontent = substr($answer,0,10); echo "Content of \$bigcontent = $bigcontent"; exit(); Re: substr help Programming Databases by mamtha Thanks for your help Re: substr help Programming Databases by debasisdas You are most welcome. Re: substr Programming Software Development by mrnutty you have the starting position and the length of the string, so just start reading character by character from the starting position length number of times. Re: substr Programming Software Development by YasaminKh I think i could have done that if i had a string, by writing something like this: string t = ""; for(int i=start;i<start+length;i++){ t+=sentence[i]; } But in the Code that I'm writing, the larger string that i called it sentence in above sample, hasn't been specified as a string. I might not be on a right track. I'm new … Re: substr Programming Software Development by NathanOliver what is the type of the variable [icode]sentence[/icode] Re: substr Programming Software Development by YasaminKh it's a string.