////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
////
:documentationPath: /pipeline/transforms/
:language: en_US
:description: The Strings Cut transform cuts a portion of a (sub)string. If the designated field is out of range, it returns blank.

= image:transforms/icons/stringcut.svg[Strings cut transform Icon, role="image-doc-icon"] Strings cut

[%noheader,cols="3a,1a", role="table-no-borders" ]
|===
|
== Description

The Strings Cut transform cuts a portion of a (sub)string. If the designated field is out of range, it returns blank.

|
== Supported Engines
[%noheader,cols="2,1a",frame=none, role="table-supported-engines"]
!===
!Hop Engine! image:check_mark.svg[Supported, 24]
!Spark! image:question_mark.svg[Maybe Supported, 24]
!Flink! image:question_mark.svg[Maybe Supported, 24]
!Dataflow! image:question_mark.svg[Maybe Supported, 24]
!===
|===

== Options

[options="header"]
|===
|Option|Description
|Transform name|Name of the transform.
|In stream field|Name of the field whose substring to cut.
|Out stream field|When a field name is given here, the transform creates a new field with the substring.
Otherwise the original field gets replaced by the substring.
|Cut from|Designate where to begin cutting the substring.
This value is 0-based, thus the first character in a string is 0.
|Cut to|Designate where to end cutting the substring.
This value is exclusive (1-based), so using a 1 includes the first character.
The maximum length of the new string is Cut to minus Cut from.
|===
