Link to home
Start Free TrialLog in
Avatar of dotsandcoms
dotsandcoms

asked on

String split

Hello experts,

I have below code in vb 6.0 which i want to convert into C#:

Code in vb 6.0
==============
Arr = Split(sStr, "@@@")
  
  m = 0
For i = 0 To UBound(Arr)
    Arr1 = Split(Arr(i), "***")
    Set Group = wndTaskPanel.Groups.Add(i, Arr1(0))
    
    Group.Tooltip = Trim(Arr1(0))
    Group.Special = True
    n = 0
    For j = 1 To UBound(Arr1)
      arr2 = Split(Arr1(j), "||")
      If UBound(arr2) > 0 Then
        n = n + 1
        m = m + 1
        Group.Items.Add n, arr2(1), xtpTaskItemTypeLink, m
        Set ITEM = Group.Items(n)
        ITEM.Tag = Arr1(j)
      End If
    Next j
    
    Group.Expanded = False
  Next i

Open in new window

=========================

where  sStr =
General***0||Inspection||Well developed, WN, NAD, neat in appearance~High^no^yes~appears to be||Pt in no acute distress~High^Left Arm^Lower^mild~||Pt is well nourished~Lower^no^Right Arm~appears to be^Normal||Pt in mild distress~yes~||Pt in much distress~High^Left Arm^Lower^no~||Pt appears malnourished~High^Low^Right Arm~||Pt appears anxious~High^Left Arm~||disheveled in appearance~High^Left Arm~@@@Eyes***0||Conjunctivae and lids||conjunctivae and lids normal~~~~||conjunctivae clear~~~~||conjunctivae injected~~~~||lids normal~~~~||no scleral icterus~~~~||scleral icterus~~~~||proptosis~~~~||injected conjunctivae~~~~||watery discharge both eyes~~~~||some watery discharge noted~~~~||Mucousy discharge~~~~||entropion~~~~||ectropium~FRFRFR^Left^Right Arm~Every 4 hours^Normal||chalazion~~~~||hordeolum~~~~***0||Pupils||equal, round, reactive to light and accommodation~~~~||direct and consensual response to light is normal~~~~||anisocoria~~~~||cloudy pupil~~~~||pterygium~~~~***0||Ophthalmoscopic||discs sharp and flat, no a/v nicking, hemorrhages, or exudates~~~~||A-V nicking no cotton wool patches or exudates~~~~||normal red reflexes~~~~||retinal hemorrhages~~~~||A-V nicking~~~~||cotton wool patches~~~~||cataract left eye~~~~||cataract right eye~~~~@@@ENT***0||Otoscopic||canal clear~~~~||tympanic membrane intact~~~~||wax in right canal~~~~||wax in left canal~~~~||bulging TM~~~~||retracted TM~~~~||erythematous TM~~~~||acute L otitis~~~~||acute R otitis~~~~||serous L otitis~~~~||serous R otitis~~~~||perforation of left tympanic membrane~~~~||perforation of right tympanic membrane~~~~||pamtox~~~~!!!!!!***0||External Ears||normal, no lesions or deformities~~~~||deformity of pinna~~~~||deformity of tragus~~~~||Pierced ears~~~~||otorrhea~~~~||redness~~~~||test~Both~1~no~both***0||Hearing||grossly intact~~~~||grossly normal with hearing aids~~~~||markedly hard of hearing~~~~||decreased hearing R~~~~||decreased hearing L~~~~||decreased hearing R and L~~~~||Rinnes test negative R~~~~||Rinnes test negative L~~~~||Rinnes test positive~~~~||Webers test negative~~~~||positive Webers test~~~~***0||Nasal Passages||mucosa, septum, and turbinates normal~~~~||septum appears midline~~~~||deviated septum~~~~||perforated septum~~~~||polyps~~~~||nose congested~~~~||blood noticed in the mucosa bilaterally~~~~||slightly congested with swollen turbinates~~~~***0||External Nose||normal, no lesions or deformities~~~~||nasal discharge~~~~||saddle nose deformity~~~~||rhinophyma~~~~***0||Dental||good dentition~no^yes~Back pain||poor dentition~no^yes~Back pain||no crepitus at TMJ~no^yes~Back pain||crepitus at TMJ~no^yes~Back pain||no caries present~no^yes~Back pain||caries present~no^yes~Back pain||dentures noted~no^yes~Back pain||missing teeth~High~Back pain***0||Pharynx||tongue normal, posterior pharynx without erythema or exudate~~~~||pharynx normal~~~~||pharynx red~~~~||pharynx with cobblestoning~~~~||tonsils normal~~~~||tonsils with exudate~~~~||tonsils enlarged~~~~||mucosa with white plaque (thrush)~~~~||reddened, no pus or exudate noted~~~~||tongue pierced with metal midline, no erythema~~~~***0||Sinuses||no tenderness to palpation~~~~||tenderness to palpation of frontal sinuses~~~~||tenderness to palpation of maxillary sinuses~~~~@@@Cardiovascular***0||Auscultation||RRR, S1 and S2 normal, no murmur, rub, or gallop~~~~||irregularly irregular rhythm with no murmurs~~~~||basal systolic murmur~~~~||basal diastolic murmur~~~~||apical systolic murmur~~~~||apical diastolic murmur~~~~||systolic murmur LSB~~~~||pericardial rub~~~~***0||Pedal pulses||pulses 2+, symmetric~~~~||pulses 1+, symmetric~~~~||right dorsalis pedis~~~~||right post. tibial~~~~||left dorsalis pedis~~~~||left post. tibial~~~~||weak~~~~||absent~~~~||decreased bilaterally~~~~***0||Carotid arteries||pulses 2+, symmetric, no bruits heard ||right carotid ||left carotid ||pulses 2+ ||pulse weak ||pulse absent ||without bruit ||with bruit ||right bruit ||left bruit ||absent left pulse ||absent right pulse ||bifid left ||bifid right ||hyperdynamic right ||hyperdynamic left ||delayed right ||delayed left ||bruits bilaterally ||pulses 2+, symmetric ||slight bruits heard on left ||transmitted bruit from right supraclavicular area ||pulses 2+, symmetric, no bruits heard but scars noted bilaterally ||pulses 2+, symmetric, bruit heard on left***0||Abdominal aorta||no enlargement or bruits||midline abdominal bruit||pulsating abdominal mass***0||Femoral||pulses 2+, symmetric, no bruits~~~~||pulse weak~~~~||pulse absent~~~~||without bruit~~~~||with bruit~~~~***0||Peripheral circulation||no cyanosis, clubbing, edema, or varicosities~~~~||cold extremities~~~~||acral cyanosis~~~~||clubbing~~~~||variscosities~~~~||pedal edema~~~~||pretibial edema~~~~||ankle edema~~~~||calf tenderness~~~~***0||Palpation||no thrill or palpable murmurs, no displacement of PMI~~~~||no masses or tenderness~~~~||chest wall tenderness~~~~||sustained PMI~~~~||laterally displaced PMI~~~~||enlarged PMI~~~~||hyperdynamic PMI~~~~||palpable murmur~~~~||heave~~~~||subcutaneous nodules~~~~||no subcutaneous nodules or induration~~~~||pectus excavatum~~~~@@@Respiratory***0||Auscultation||normal breath sounds in all lung fields~~~~||no rales, rhonchi, or wheezes~~~~||Decreased breath sounds bilaterally~~~~||wheezing~~~~||rhonchi~~~~||tachypneic~~~~||rales~~~~***0||Respiratory effort||no intercostal retractions or use of accessory muscles||use of accessory muscles ||intercostal retractions ||Cheyne-Stokes ||Kussmaul ||decreased chest excursion***0||Percussion||no dullness ||unilateral dullness ||hyperresonance***0||Palpation||normal fremitus~~~~||no masses or tenderness~~~~||no subcutaneous nodules or induration~~~~||decreased fremitus~~~~||increased fremitus~~~~||subcutaneous nodules~~~~||pectus excavatum~~~~||Large subcutaneous mass~~~~@@@Gastrointestinal***0||Liver and spleen||no enlargement or nodularity~~~~||hepatomegaly~~~~||splenomegaly~~~~||liver tenderness~~~~||pulsatile liver~~~~***0||Rectal||no masses or tenderness~~~~||internal hemorrhoids~~~~||thrombosed hemorrhoids~~~~||external hemorrhoid without prolapse noted~~~~||diffuse tenderness~~~~||normal sphincter tone~~~~||enlarged prostate~~~~||anal skin tags~~~~||anal fissure~~~~||anal fistula~~~~||redness~~~~||guaiac positive~~~~||guaiac negative~~~~***0||Hernias||no hernias noted~~~~||L inguinal hernia~~~~||R inguinal hernia~~~~||bilateral inguinal hernias~~~~||abdominal wall hernia~~~~||umbilical hernia~~~~||slight palpable impulse noted with coughing~~~~***0||Stool||guaiac negative~~~~||guaiac positive~~~~||tested, sample will be sent~~~~||hard large stool palpable~~~~***0||Palpation||soft, non-tender, no masses~~~~||no guarding~~~~||no subcutaneous nodules or induration~~~~||subcutaneous nodules~~~~||RUQ tenderness~~~~||LUQ tenderness~~~~||RLQ tenderness~~~~||LLQ tenderness~~~~||epigastric tenderness~~~~||guarding~~~~||rebound tenderness~~~~||positive Obturator sign~~~~||positive Psoas sign~~~~||positive Murphy sign~~~~***0||Auscultation||||normal bowel sounds~~~~||hyperactive bowel sounds~~~~||hypoactive bowel sounds~~~~||abdominal aortic bruit~~~~||renal bruit~~~~||inguinal bruit~~~~||femoral bruit~~~~@@@Genitourinary***0||Scrotum||no lesions, cysts, edema, or rash~~~~||cyst~~~~||rash~~~~||left testicle absent~~~~||right testicle absent~~~~||swelling~~~~***0||Prostate||no enlargement or nodularity~~~~||diffuse non-tender enlargement~~~~||diffuse tender enlargement~~~~||hard nodule~~~~||diffuse non-tender enlargement, firm and prominent lobes~~~~||slight en***0||Penis||no lesions or discharge~~~~||circumcised~~~~||non-circumcised~~~~||ulcer~~~~||scarring~~~~||phimosis~~~~||hypospadias~~~~||epispadias~~~~***0||vagina||Normal~~~~||Discharge~~~~||Lesion~~~~||Bleeding~~~~||Atrophy~~~~||Cystocele~~~~***0||cervix||||Absent~~~~||Lesion~~~~||Discharge~~~~||positive Chadwick sign~~~~||Normal~~~~***0||Breast||Symmetric, non-tender, no discharge, no masses~~~~||Mass~~~~||Breast tenderness~~~~||Discharge~~~~||Rash~~~~||Lesion~~~~||Erythema~~~~***0||Uterus||||Absent~~~~||Tenderness~~~~||Normal position~~~~||Antiverted~~~~||Retroverted~~~~***0||LMP||***0||Adnexa||||Mass~~~~||Tenderness~~~~@@@Musculoskeletal***0||Head and neck||normal alignment~~~~||full ROM~~~~||no pain with ROM~~~~||muscles are symmetric~~~~||no tenderness to palpation~~~~||malalignment~~~~||crepitus at right TMJ~~~~||decreased ROM~~~~||pain with flexion~~~~||pain with extension~~~~||pain with right lateral flexion~~~~||pain with left lateral flexion~~~~||pain with right rotation~~~~||pain with left rotation~~~~||torticollis~~~~***0||Digits and nails||no clubbing, cyanosis, petechiae, or nodes~~~~||pitting~~~~||clubbing~~~~||acral cyanosis~~~~||sclerodactyly~~~~||stiffness in finger~~~~||Pain in finger~~~~***0||Spine ribs pelvis||normal alignment, no deformity~~~~||full ROM~~~~||no pain with ROM~~~~||kyphosis~~~~||scoliosis~~~~||lordosis~~~~||paraspinal spasm~~~~||vertebral tenderness~~~~||paraspinal tenderness~~~~||limited ROM~~~~||pain with forward flexion~~~~||pain with extension~~~~||pain with right lateral flexion~~~~||pain with left lateral flexion~~~~||pain with right rotation~~~~||pain with left rotation~~~~***0||Gait and station||normal~~~~||ataxic~~~~||waddling~~~~||nonambulatory~~~~||ataxic, weak, needs assistance with walking~~~~||waddling, unable to walk without support~~~~||ataxic, using cane for walking~~~~||wide-based gait, slightly ataxic, but steady with cane~~~~||wide-based gait, slightly ataxic~~~~||slow and slightly ataxic and moves very slowly with the use of his cane~~~~||narrow based slow gait~~~~||negative Romberg test~~~~||positive Romberg test~~~~***0||RUE||full ROM~~~~||normal strength~~~~||no swelling~~~~||no tenderness~~~~||decreased ROM~~~~||decreased strength~~~~***0||LUE||full ROM~~~~||normal strength~~~~||no swelling~~~~||no tenderness~~~~||decreased ROM~~~~||decreased strength~~~~***0||RLE||full ROM~~~~||normal strength~~~~||no swelling~~~~||no tenderness~~~~||decreased ROM~~~~||decreased strength~~~~||knee effusion~~~~||ankle effusion~~~~||positive Lachman test~~~~||positive McMurrays~~~~***0||LLE||full ROM~~~~||normal strength~~~~||no swelling~~~~||no tenderness~~~~||decreased ROM~~~~||decreased strength~~~~||knee effusion~~~~||ankle effusion~~~~||positive Lachman test~~~~||positive McMurrays~~~~@@@Neurologic***0||Cranial nerves||II - XII grossly intact~~~~||focal findings~~~~||CN II deficit~~~~||CN III deficit~~~~||CN IV deficit~~~~||CN V deficit~~~~||CN VI deficit~~~~||CN VII deficit~~~~||CN VIII deficit~~~~||CN IX deficit~~~~||CN X deficit~~~~||CN XI deficit~~~~||CN XII deficit~~~~***0||Reflexes||2+, symmetric, no pathological reflexes~~~~||positive grasp, startle, and Babinski~~~~||bilateral hyporeflexia~~~~||unable to elicit on lower limbs~~~~||patellar reflex~1+^2+^3+^4+~||achilles reflex~1+^2+^3+^4+~||biceps reflex~1+^2+^3+^4+~||triceps reflex~1+^2+^3+^4+~||brachioradialis reflex~1+^2+^3+^4+~||positive Babinski reflex~~~~||negative Babinski reflex~~~~***0||Sensation||intact to touch, pin, vibration, and position~~~~||monofilament sensory testing of feet normal bilaterally~~~~||hyperesthesia~~~~||decreased sensation bilaterally from ankle down~~~~||no decrease in sensation to light touch or pinprick~~~~@@@Skin***0||Inspection||no rashes, lesions, or ulcerations~~~~||rash~~~~||petechiae~~~~||purpura~~~~||ecchymosis~~~~||yellow nailbeds~~~~||acne~~~~||nail pitting~~~~||tattoos present~~~~***0||Palpation||induration~~~~||no masses or tenderness~~~~||subcutaneous nodules~~~~||no subcutaneous nodules or induration~~~~||dry to touch~~~~||scaly~~~~||warm~~~~||clammy~~~~@@@Psychiatric***0||Mental status||alert and oriented x 3~~~~||normal affect~~~~||delirious~~~~||confused~~~~||agitated~~~~@@@Heme Lymphatic***0||Inspection||varicose veins~~~~||hematoma~~~~***0||Palpation||no lymphadenopathy present~~~~||lymphadenopathy present~~~~@@@Breast***0||Inspection||||redness~~~~||swelling~~~~||skin texture changes~~~~||nipple retraction~~~~||supernumerary nipples~~~~***0||Palpation||||no masses or tenderness to palpation~~~~||mass~~~~||tenderness~~~~||nipple discharge~~~~||axillary lymphadenopathy~~~~@@@Neck***0||Inspection||||mass visualized~~~~***0||Palpation||no lymphadenopathy present~~~~||thyroid is normal size without masses~~~~||preauricular adenopathy~~~~||posterior auricular adenopathy~~~~||anterior cervical adenopathy~~~~||posterior cervical adenopathy~~~~||deep cervical adenopathy~~~~||tonsillar adenopathy~~~~||submandibular adenopathy~~~~||submental adenopathy~~~~||thyromegaly~~~~||goiter~~~~***0||Auscultation||||no carotid bruits heard~~~~||left carotid bruit~~~~||right carotid bruit~~~~@@@Head***0||Inspection||NCAT~~~~||no alopecia~~~~||alopecia~~~~||laceration~~~~***0||Palpation||no lumps or masses~~~~||no tenderness to palpation~~~~||mass present~~~~||tender to palpation~~~~||occipital adenopathy~~~~||facial asymmetry~~~~||facial droop~~~~@@@Rectal***0||Palpation||prostate normal size and texture~~~~||normal rectal exam~~~~||tenderness~~~~||enlarged prostate~~~~||nodular prostate~~~~||prostate mass~~~~||rectal mass~~~~||guaiac negative~~~~||guaiac positive~~~~||internal hemorrhoid~~~~||external hemorrhoid~~~~||thrombosed hemorrhoid~~~~||anal fistula~~~~||anal fissure~~~~argement with no nodularity or tenderness~~~~

Open in new window


how can i achieve this in C# in easiest possible way?

Any help will be greatly appreciated.

Many thanks



<edit by a3: moved code and data into code snippets />
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>kaufmed

<no points>
shouldn't this line
          var ITEM = Group.Items[m];
be
          var ITEM = Group.Items[n];
</nopoints>

AW
@Arthur_Wood

Yes it should. Good catch  = )
Avatar of dotsandcoms
dotsandcoms

ASKER

good job....thanks