C#C
C#3y ago
23 replies
Thommy

✅ Reading Text in File at Position x

Hello. I would have to read the text of job_offer_data, starting with target and ending with trailer_place, from the text field.
Since the text can always be somewhere different in my text field, the method with a fixed line number doesn't work.
Can someone help me with that? With Contains I get up to the line job_offer_data but it's not clear to me how I can output the 13 lines from then on

company : company.volatile.radus_ru.varna {
 permanent_data: company.permanent.radus_ru
 delivered_trailer: null
 delivered_pos: 0
 job_offer: 4
 job_offer[0]: _nameless.1e8.0c85.9960
 job_offer[1]: _nameless.1e8.0c85.af50
 job_offer[2]: _nameless.1e8.0c85.b0f0
 job_offer[3]: _nameless.1e8.0c85.a590
 cargo_offer_seeds: 10
 cargo_offer_seeds[0]: 18399998
 cargo_offer_seeds[1]: 18399634
 cargo_offer_seeds[2]: 18399383
 cargo_offer_seeds[3]: 18399334
 cargo_offer_seeds[4]: 18400147
 cargo_offer_seeds[5]: 18399704
 cargo_offer_seeds[6]: 18400015
 cargo_offer_seeds[7]: 18399644
 cargo_offer_seeds[8]: 18398938
 cargo_offer_seeds[9]: 18399418
 discovered: true
 reserved_trailer_slot: nil
 state: 0
 state_change_time: 0
}

job_offer_data : _nameless.1e8.0c85.9960 {
 target: "canteras_ds.almeria"
 expiration_time: 18399337
 urgency: 0
 shortest_distance_km: 3887
 ferry_time: 0
 ferry_price: 0
 cargo: cargo.emptytank
 company_truck: renault_magnum_4x2_a
 trailer_variant: trailer.scs_flat_c_r
 trailer_definition: trailer_def.scs.flatbed.single_3.container
 units_count: 2
 fill_ratio: 1
 trailer_place: 0
}

company : company.volatile.subse.edirne {
 permanent_data: company.permanent.subse
 delivered_trailer: null
 delivered_pos: 0
 job_offer: 2
 job_offer[0]: _nameless.1e8.0c85.8440
 job_offer[1]: _nameless.1e8.0c85.9480
 cargo_offer_seeds: 10
 cargo_offer_seeds[0]: 18398603
 cargo_offer_seeds[1]: 18399292
 cargo_offer_seeds[8]: 18399463
 cargo_offer_seeds[9]: 18399170
 discovered: true
 reserved_trailer_slot: nil
 state: 0
 state_change_time: 0
}
Was this page helpful?