Re: substr is not working.. Programming Web Development by wetube substr("$row1['j_des']", 0, 600); try this Re: Substring Error ??????? Programming Software Development by ShawnCplus substr() isn't a member function of an int. An int is a primitive, not a class. Also, you can't really call a substring on an integer. Re: How to read a string within a string without using substring Programming Software Development by Tygawr Substr is too slow. Re: Question about limiting charachters and updating certain things in php Programming Web Development by shahbaz13 substr trims the pice of text line you use [code]Re: Question about limiting charachters and updating certain things in php by using substr("Re: Question about limiting charachters and updating certain things in php", 20); it outputs... Re: Question about l it shows only the first 20 chars... [/code] Re: Replace a Word in a .txt file Programming Software Development by Ancient Dragon >>substr(0, rfind("[")+1) Don't even attempt to do that because it might crash the program if rfind returns string::npos (-1). Better to split it into two lines so that you can do error checking [code] size_t pos = line.find('['); if( pos != string::npos) { int x = atoi( line.substring(pos+1).c_str()); } [/code] Re: Display data on a textbox in PHP Programming Web Development by kimhanu substr function in PHP and space please ! 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(); Fast substr Programming Software Development by William Hemsworth … as a [ICODE]char*[/ICODE], but [ICODE]string::substr[/ICODE] returns a [ICODE]const char*[/ICODE]. So …memory takes about twice as long than [ICODE]string::substr[/ICODE] to manage everything. Here is the code…, end /= loops;\ std::cout << GetMeasure(); char *SubStr(char *text, unsigned int beg, unsigned int fin) { unsigned int…