Home / excel replace character in string / CHARACTER CODES STRING EXTRACTION STRING …
CHARACTER CODES STRING EXTRACTION STRING MANIPULATION
PATINDEX ('%pattern%' , `A')
ASCII (`C') Returns starting position of the first occurrence SUBSTRING (`A', start, length) CONCAT (`A', `B' [,`C'])
Returns the ASCII code value of the leftmost of a %pattern% in string `A' Returns L characters of `A' starting at S Returns a string that is the result of
character of `' PATINDEX('H','HELLO') = 0 SUBSTRING('HELLOW',2,1) = 'E' concatenating two or more string values
ASCII ('A') = 65 PATINDEX('H%','HELLO') = 1 SUBSTRING('HELLOW',5,10) = 'OW' CONCAT('HELLO')=ERROR
ASCII ('BEE') = 66 PATINDEX('%L_%','HELLO') = 3 SUBSTRING('HELLOW',10,1) = '' CONCAT(NULL, NULL)= ''
PATINDEX('%L_','HELLO') = 4 SUBSTRING('HELLOW',0,1) = '' CONCAT('HI',' ','WORLD')='HI WORLD'
CHAR (A) PATINDEX ('Z','HELLO') = 0 SUBSTRING('HELLOW',1,0) = '' CONCAT(12,NULL,34) = '1234'
Converts an integer ASCII code A to a character PATINDEX('%A[0-9]%','AA1A') = 2 CONCAT(2014,12,31) = '20141231'
CHAR (65) = 'A'
PATINDEX('%L[^L]%','HELLO') = 4 LEFT (`A', B) / RIGHT (`A', B)
CHAR (1000) = NULL Returns the left/right part of `A' with the LOWER (`A') / UPPER (`A')
STUFF (`A', S, L, `B') specified number B Makes `A' lowercase/uppercase
UNICODE (A) Replaces L characters of `A' starting at S with `B' RIGHT ('', 1) = '' LOWER ('HI') = 'hi'
Returns the int value for the first character of `A'
STUFF('HELLOW',2,5,'I') = 'HI' LEFT ('HI', 0) = '' UPPER ('hi') = 'HI'
STUFF('HELLOW',2,15,'I') = 'HI' RIGHT ('HI', 3) = 'HI'
UNICODE('A') = 65 STUFF('HELLOW',20,1,'I') = NULL RIGHT ('HELLOW WORLD',5) = 'WORLD'
STUFF('HELLOW',0,1,'I') = NULL LEFT ('HELLOW WORLD', 6) = 'HELLOW' LTRIM (`A') / RTRIM (`A')
NCHAR (A) STUFF('HELLOW',1,0,'I') = 'IHELLOW' Returns `A' removing leading/trailing blanks
Returns the Unicode character with the specified STRING GENERATION
integer code A SOUNDEX & OTHER LTRIM (' HI ') = 'HI '
NCHAR (66000) = NULL SPACE (A)
LTRIM (' ') = ''
RTRIM(' HI ') = ' HI'
NCHAR (8) = '' SOUNDEX (`A') Returns a string of A spaces
NCHAR ('8') = '' Returns a four-character (SOUNDEX) code to SPACE(2) = ' ' QUOTENAME (`A', [`B'])
evaluate the similarity of two strings Makes `A' a valid SQL Server using `B' delimiter
SEARCH & REPLACE SOUNDEX ('Smith') = 'S530' REPLICATE (`A', B) QUOTENAME('TB NAME')=[TB NAME]
SOUNDEX ('Smythe') = 'S530'
CHARINDEX (`A', `B', [, S]) Repeats a string value `A' specified number of QUOTENAME('TB NAME', '] ')=[TB NAME]
times B QUOTENAME('TB NAME', '"')="TB NAME"
Searches `B' for `A' and returns its starting DIFFERENCE (`A', `B') REPLICATE ('0', 4) = '0000' QUOTENAME('abc[]def')=[abc[]]def]
position if found. The search starts at S Returns an integer value that indicates the REPLICATE ('-', 0) = '' QUOTENAME('TB NAME', '''')='TB NAME'
CHARINDEX ('Z', 'HELLO') = 0 difference between the SOUNDEX of `A' and `B' REPLICATE ('-', NULL) = NULL
CHARINDEX ('H', 'HELLO') = 1 DIFFERENCE('GREEN','GREENE') = 4 REVERSE (`A')
CHARINDEX ('OR', 'WORLD') = 2 STR (A [,length [, decimal]])
CHARINDEX ('L', 'HELLO', 4) = 4 Returns the reverse order of a string value
LEN (`A') Converts A number to string REVERSE('HELLOW') = 'WOLLEH'
STR (2.234) = ' 2'
REPLACE (`A', `B', `C') Returns length of `A', excluding trailing blanks STR (2.234, 4) = ' 2' REVERSE(12) = 21
Replaces in `A' all occurrences of string `B' with LEN ('HELLOW WORD') = 11 STR (2.234, 4, 2) = '2.23'
string `'
LEN ('HELLOW ') = 6 STR (2.234, 6, 2) = ' 2.23'
LEN (12) = 2
REPLACE('HELLOW',NULL,'')=NULL LEN ('') = 0
REPLACE('HELLOW','','_')='HELLOW'
REPLACE('HELLOW','ELLOW','I')='HI'
REPLACE('HELLOW','L',1) = 'HE11OW'
How to replace a certain character in a string? In the first line taking input from the user as a string. Further asking character as an input to replace in the provided string. The replace method creates a new string with the replaced character in the next line because the string in java is immutable.
Author: SberUser
Creator: Microsoft® Word 2010
Producer: Microsoft® Word 2010
CreationDate: Mon Feb 2 18:07:55 2015
ModDate: Mon Feb 2 18:07:55 2015
Tagged: yes
Form: none
Pages: 1
Encrypted: no
Page size: 841.8 x 595.4 pts (A4) (rotated 0 degrees)
File size: 423151 bytes
Optimized: no
PDF version: 1.5