Add string index/slice operations (#18247)
authorDavid Riazati <davidriazati@fb.com>
Mon, 1 Apr 2019 18:58:28 +0000 (11:58 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 1 Apr 2019 19:11:35 +0000 (12:11 -0700)
commitbe01c907972367fc421acf86dd825caf662e448a
treef2eddc4301c934a53b8c61d11c603dcd3ef26191
parentaf9335436df5da8242dacae86f8c5cddd498ebaa
Add string index/slice operations (#18247)

Summary:
Adds support for string indexing (`"a"[0]`) and slicing (`"abc"[1:3]`)
to script.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18247

Differential Revision: D14574486

Pulled By: driazati

fbshipit-source-id: 4b42aa0881e5398ea7f112be46c0335e6e19dced
aten/src/ATen/core/interned_strings.h
test/test_jit.py
torch/csrc/jit/register_prim_ops.cpp
torch/csrc/jit/script/compiler.cpp
torch/csrc/jit/script/schema_matching.cpp