Top "Substr" questions

A function/method that returns part of a string.

Ruby - How to select some characters from string

I am trying to find a function for select e.g. first 100 chars of the string. In PHP, there exists …

ruby string function char substr
Moment JS - how to subtract 7 days from current date?

I would like to subtract 7 days from current date to get formatted date YYYY-MM-DD using moment.js library. I tried …

javascript date momentjs substr
Remove all characters after a specific character in PL/SQL

How do I get a substring from this example value: john.abc_1234 I want it to return john.abc.So …

sql oracle plsql oracle9i substr
php substr() function with utf-8 leaves � marks at the end

Here is simple code <?php $var = "Бензин Офиси А.С. также производит все типы жира и смазок и их побочных продуктов в его смесительных установках нефти машинного масла в Деринце, Измите, Алиага и Измире. У Компании есть 3 885 станций технического обслуживания, включая сжиженный газ (ЛПГ) станции под фирменным знаком Петрогаз, приблизительно 5 000 дилеров, двух смазочных смесительных установок, 12 терминалов, и 26 единиц поставки аэропорта."; $foo = substr($var,0,142); echo $foo; ?> and it outputs something like this: Бензин Офиси А.С. также производит все типы жира и смазок и их побочных продук�... I …

php utf-8 substr
Case insensitive standard string comparison in C++

void main() { std::string str1 = "abracadabra"; std::string str2 = "AbRaCaDaBra"; if (!str1.compare(str2)) { cout << "Compares" } } How can …

c++ string substr
PHP substr after a certain char, a substr + strpos elegant solution?

let's say I want to return all chars after some needle char 'x' from: $source_str = "Tuex helo babe". Normally …

php substr strpos
Using substr to trim string on Oracle

I want to trim a string to a specified length. If the string is shorter, I don't want to do …

sql oracle plsql substr
Extract string before "|"

I have a data set wherein a column looks like this: ABC|DEF|GHI, ABCD|EFG|HIJK, ABCDE|FGHI|JKL, …

r extract substr
Set the header( content-type: image/<ANY IMG FORMAT>)

The php file that handles the images I display only allows one image format, either .jpg, .png, .bmp, etc but …

php http-headers substr
SELECT as much data from CLOB to VARCHAR2 as possible, with multibyte chars in the data

Multi-byte characters had caused me a lot of pain. Any suggestion for this problem? I have a CLOB field that …

sql oracle substr clob multibyte