Skip to content

Commit 55bbe5d

Browse files
committed
occursin
1 parent 4eac67c commit 55bbe5d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/roadway.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ end
143143
function write_dxf(io::IO, roadway::NGSIMRoadway)
144144

145145
lines = open(readlines, joinpath(@__DIR__, "../data/template.dxf"))
146-
i = findfirst(lines, "ENTITIES\n")
146+
i = occursin("ENTITIES\n", lines)
147147
i != 0 || error("ENTITIES section not found")
148148

149149
# write out header

src/trajdata.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ function Base.convert(::Type{Trajdata}, tdraw::NGSIMTrajdata, roadway::Roadway)
188188
Trajdata(NGSIM_TIMESTEP, frames, states, vehdefs)
189189
end
190190

191-
get_corresponding_roadway(filename::String) = occursin(filename, "i101") ? ROADWAY_101 : ROADWAY_80
191+
get_corresponding_roadway(filename::String) = occursin("i101", filename) ? ROADWAY_101 : ROADWAY_80
192192

193193

194194
function convert_raw_ngsim_to_trajdatas()

0 commit comments

Comments
 (0)