Add GetStringView like GetString, GetCstring (#5937)
authorstefan301 <32997632+stefan301@users.noreply.github.com>
Fri, 29 May 2020 17:00:46 +0000 (19:00 +0200)
committerGitHub <noreply@github.com>
Fri, 29 May 2020 17:00:46 +0000 (10:00 -0700)
commita0da0c08c603e1b77f24d1db83f79c9f64341768
treee2c82e73762f00fc6edca8c68f9c92987357113f
parentac203b20926b13a35ff85277d2e5d3c38698eee8
Add GetStringView like GetString, GetCstring (#5937)

* Added missing EndTable() call to VerifyObject()

VerifyObject called VerifyTableStart() but not EndTable(). This made Verifier::VerifyComplexity() increase depth_ with each table, not with the depth of tables.

https://groups.google.com/forum/#!topic/flatbuffers/OpxtW5UFAdg

* Added Check to VerifyAlignment

https://stackoverflow.com/questions/59376308/flatbuffers-verifier-returns-false-without-any-assertion-flatbuffers-debug-veri

* Add GetStringView (Convenience function to get string_view from a String returning an empty string_view on null pointer) like GetString, GetCstring

Co-authored-by: stefan301 <Stefan.Felkel@de.Zuken.com>
include/flatbuffers/flatbuffers.h