Click here to Skip to main content
15,891,621 members
Home / Discussions / C#
   

C#

 
AnswerRe: Finding * characters in a string Pin
Alex Manolescu11-Jan-10 9:31
Alex Manolescu11-Jan-10 9:31 
GeneralRe: Finding * characters in a string Pin
PIEBALDconsult11-Jan-10 14:54
mvePIEBALDconsult11-Jan-10 14:54 
AnswerRe: Finding * characters in a string Pin
Luc Pattyn11-Jan-10 9:48
sitebuilderLuc Pattyn11-Jan-10 9:48 
GeneralRe: Finding * characters in a string Pin
sleepyman12-Jan-10 8:11
sleepyman12-Jan-10 8:11 
AnswerRe: Finding * characters in a string Pin
PIEBALDconsult11-Jan-10 14:52
mvePIEBALDconsult11-Jan-10 14:52 
Questiongetting a specific tag out of a web page Dom info [modified] Pin
manustone11-Jan-10 6:39
manustone11-Jan-10 6:39 
AnswerRe: getting a specific tag out of a web page Dom info Pin
manustone12-Jan-10 20:41
manustone12-Jan-10 20:41 
QuestionMerge strings and overwrite certain characters based on a filter Pin
AndreasLa11-Jan-10 6:18
AndreasLa11-Jan-10 6:18 
Hello,
I'm wondering if there is any built in function in c# .net that can write/insert a string over/into another string and based on a "transparent" character parts of the first string is preserved?
You have two strings, strA and strB.
strA is the "base" string and strB is the "outside" string we want to merge into strA. strB overwrites strA unless the character is a blank space character.

I could/will create my own function that accomplish this but I'm curios if there's any build in c# .net function that does this. Is there any name for such operation?

Here are some examples of how I want to merge the strings:

Example 1:
string strA = "This is string A";  // Length = 16
string strB = "                 This is string B"; // Length = 33
// Merge strA and strB, character ' ' is transparent.
// Desired result = "This is string A This is string B"; // Length = 33

Example 2: "Transparent blank space character"
string strA = "This is string A";  // Length = 16
string strB = "      This is string B"; // Length = 22
// Merge strA and strB, character ' ' is transparent.
// Desired result = "This iThisrisgstring B"; // Length = 22

Example 3:
string strA = "This is string A and it is longer then string B";  // Length = 47
string strB = "      This is string B"; // Length = 22
// Merge strA and strB, character ' ' is transparent.
// Desired result = "This iThisrisgstring Bt is longer then string B"; // Length = 47

AnswerRe: Merge strings and overwrite certain characters based on a filter Pin
Dave Kreskowiak11-Jan-10 6:32
mveDave Kreskowiak11-Jan-10 6:32 
AnswerRe: Merge strings and overwrite certain characters based on a filter Pin
Saksida Bojan11-Jan-10 6:38
Saksida Bojan11-Jan-10 6:38 
Questionwriting xml using datagrid Pin
naghoumeh1411-Jan-10 6:04
naghoumeh1411-Jan-10 6:04 
QuestionGetting all data from commandline app Pin
blaatschapje11-Jan-10 5:31
blaatschapje11-Jan-10 5:31 
AnswerRe: Getting all data from commandline app Pin
Alan N11-Jan-10 6:22
Alan N11-Jan-10 6:22 
AnswerRe: Getting all data from commandline app Pin
Luc Pattyn11-Jan-10 7:01
sitebuilderLuc Pattyn11-Jan-10 7:01 
QuestionMerging or adding 2 different DataTables into Single DataTable Pin
K V Sekhar11-Jan-10 5:20
K V Sekhar11-Jan-10 5:20 
AnswerRe: Merging or adding 2 different DataTables into Single DataTable Pin
Dave Kreskowiak11-Jan-10 6:26
mveDave Kreskowiak11-Jan-10 6:26 
GeneralRe: Merging or adding 2 different DataTables into Single DataTable Pin
K V Sekhar11-Jan-10 15:39
K V Sekhar11-Jan-10 15:39 
GeneralRe: Merging or adding 2 different DataTables into Single DataTable Pin
Dave Kreskowiak11-Jan-10 17:29
mveDave Kreskowiak11-Jan-10 17:29 
QuestionBlocking Queue Pin
ika211-Jan-10 3:38
ika211-Jan-10 3:38 
AnswerRe: Blocking Queue Pin
harold aptroot11-Jan-10 3:41
harold aptroot11-Jan-10 3:41 
GeneralRe: Blocking Queue Pin
ika211-Jan-10 4:18
ika211-Jan-10 4:18 
GeneralRe: Blocking Queue [modified] Pin
harold aptroot11-Jan-10 4:32
harold aptroot11-Jan-10 4:32 
AnswerRe: Blocking Queue Pin
Nicholas Butler11-Jan-10 5:31
sitebuilderNicholas Butler11-Jan-10 5:31 
QuestionProblem at second connection attempt Pin
sleepyman11-Jan-10 3:29
sleepyman11-Jan-10 3:29 
AnswerRe: Problem at second connection attempt Pin
OriginalGriff11-Jan-10 4:06
mveOriginalGriff11-Jan-10 4:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.