Aspose::Words::LowCode::Replacer::Replace method
Replacer::Replace(const System::SharedPtr<System::IO::Stream>&, const System::SharedPtr<System::IO::Stream>&, Aspose::Words::SaveFormat, const System::SharedPtr<System::Text::RegularExpressions::Regex>&, const System::String&, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&) method
Replaces all occurrences of a specified character string pattern with a replacement string in the input stream using a regular expression, with the specified save format and additional options.
static int32_t Aspose::Words::LowCode::Replacer::Replace(const System::SharedPtr<System::IO::Stream> &inputStream, const System::SharedPtr<System::IO::Stream> &outputStream, Aspose::Words::SaveFormat saveFormat, const System::SharedPtr<System::Text::RegularExpressions::Regex> &pattern, const System::String &replacement, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions> &options=nullptr)
Parameter | Type | Description |
---|---|---|
inputStream | const System::SharedPtr<System::IO::Stream>& | The input stream. |
outputStream | const System::SharedPtr<System::IO::Stream>& | The output stream. |
saveFormat | Aspose::Words::SaveFormat | The save format. |
pattern | const System::SharedPtr<System::Text::RegularExpressions::Regex>& | A regular expression pattern used to find matches. |
replacement | const System::String& | A string to replace all occurrences of pattern. |
options | const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>& | FindReplaceOptions object to specify additional options. |
ReturnValue
The number of replacements made.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.
See Also
- Enum SaveFormat
- Class FindReplaceOptions
- Class Replacer
- Namespace Aspose::Words::LowCode
- Library Aspose.Words for C++
Replacer::Replace(const System::SharedPtr<System::IO::Stream>&, const System::SharedPtr<System::IO::Stream>&, Aspose::Words::SaveFormat, const System::String&, const System::String&, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&) method
Replaces all occurrences of a specified character string pattern with a replacement string in the input stream, with the specified save format and additional options.
static int32_t Aspose::Words::LowCode::Replacer::Replace(const System::SharedPtr<System::IO::Stream> &inputStream, const System::SharedPtr<System::IO::Stream> &outputStream, Aspose::Words::SaveFormat saveFormat, const System::String &pattern, const System::String &replacement, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions> &options=nullptr)
Parameter | Type | Description |
---|---|---|
inputStream | const System::SharedPtr<System::IO::Stream>& | The input stream. |
outputStream | const System::SharedPtr<System::IO::Stream>& | The output stream. |
saveFormat | Aspose::Words::SaveFormat | The save format. |
pattern | const System::String& | A string to be replaced. |
replacement | const System::String& | A string to replace all occurrences of pattern. |
options | const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>& | FindReplaceOptions object to specify additional options. |
ReturnValue
The number of replacements made.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.
See Also
- Enum SaveFormat
- Class FindReplaceOptions
- Class Replacer
- Namespace Aspose::Words::LowCode
- Library Aspose.Words for C++
Replacer::Replace(const System::SharedPtr<System::IO::Stream>&, const System::SharedPtr<System::IO::Stream>&, const System::SharedPtr<Aspose::Words::Saving::SaveOptions>&, const System::SharedPtr<System::Text::RegularExpressions::Regex>&, const System::String&, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&) method
Replaces all occurrences of a specified character string pattern with a replacement string in the input stream using a regular expression, with the specified save format and additional options.
static int32_t Aspose::Words::LowCode::Replacer::Replace(const System::SharedPtr<System::IO::Stream> &inputStream, const System::SharedPtr<System::IO::Stream> &outputStream, const System::SharedPtr<Aspose::Words::Saving::SaveOptions> &saveOptions, const System::SharedPtr<System::Text::RegularExpressions::Regex> &pattern, const System::String &replacement, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions> &options=nullptr)
Parameter | Type | Description |
---|---|---|
inputStream | const System::SharedPtr<System::IO::Stream>& | The input stream. |
outputStream | const System::SharedPtr<System::IO::Stream>& | The output stream. |
saveOptions | const System::SharedPtr<Aspose::Words::Saving::SaveOptions>& | The save options. |
pattern | const System::SharedPtr<System::Text::RegularExpressions::Regex>& | A regular expression pattern used to find matches. |
replacement | const System::String& | A string to replace all occurrences of pattern. |
options | const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>& | FindReplaceOptions object to specify additional options. |
ReturnValue
The number of replacements made.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.
See Also
- Class SaveOptions
- Class FindReplaceOptions
- Class Replacer
- Namespace Aspose::Words::LowCode
- Library Aspose.Words for C++
Replacer::Replace(const System::SharedPtr<System::IO::Stream>&, const System::SharedPtr<System::IO::Stream>&, const System::SharedPtr<Aspose::Words::Saving::SaveOptions>&, const System::String&, const System::String&, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&) method
Replaces all occurrences of a specified character string pattern with a replacement string in the input stream, with the specified save format and additional options.
static int32_t Aspose::Words::LowCode::Replacer::Replace(const System::SharedPtr<System::IO::Stream> &inputStream, const System::SharedPtr<System::IO::Stream> &outputStream, const System::SharedPtr<Aspose::Words::Saving::SaveOptions> &saveOptions, const System::String &pattern, const System::String &replacement, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions> &options=nullptr)
Parameter | Type | Description |
---|---|---|
inputStream | const System::SharedPtr<System::IO::Stream>& | The input stream. |
outputStream | const System::SharedPtr<System::IO::Stream>& | The output stream. |
saveOptions | const System::SharedPtr<Aspose::Words::Saving::SaveOptions>& | The save options. |
pattern | const System::String& | A string to be replaced. |
replacement | const System::String& | A string to replace all occurrences of pattern. |
options | const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>& | FindReplaceOptions object to specify additional options. |
ReturnValue
The number of replacements made.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.
See Also
- Class SaveOptions
- Class FindReplaceOptions
- Class Replacer
- Namespace Aspose::Words::LowCode
- Library Aspose.Words for C++
Replacer::Replace(const System::String&, const System::String&, Aspose::Words::SaveFormat, const System::SharedPtr<System::Text::RegularExpressions::Regex>&, const System::String&, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&) method
Replaces all occurrences of a specified character string pattern with a replacement string in the input file using a regular expression, with the specified save format and additional options.
static int32_t Aspose::Words::LowCode::Replacer::Replace(const System::String &inputFileName, const System::String &outputFileName, Aspose::Words::SaveFormat saveFormat, const System::SharedPtr<System::Text::RegularExpressions::Regex> &pattern, const System::String &replacement, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions> &options=nullptr)
Parameter | Type | Description |
---|---|---|
inputFileName | const System::String& | The input file name. |
outputFileName | const System::String& | The output file name. |
saveFormat | Aspose::Words::SaveFormat | The save format. |
pattern | const System::SharedPtr<System::Text::RegularExpressions::Regex>& | A regular expression pattern used to find matches. |
replacement | const System::String& | A string to replace all occurrences of pattern. |
options | const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>& | FindReplaceOptions object to specify additional options. |
ReturnValue
The number of replacements made.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
See Also
- Enum SaveFormat
- Class FindReplaceOptions
- Class Replacer
- Namespace Aspose::Words::LowCode
- Library Aspose.Words for C++
Replacer::Replace(const System::String&, const System::String&, Aspose::Words::SaveFormat, const System::String&, const System::String&, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&) method
Replaces all occurrences of a specified character string pattern with a replacement string in the input file, with the specified save format and additional options.
static int32_t Aspose::Words::LowCode::Replacer::Replace(const System::String &inputFileName, const System::String &outputFileName, Aspose::Words::SaveFormat saveFormat, const System::String &pattern, const System::String &replacement, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions> &options=nullptr)
Parameter | Type | Description |
---|---|---|
inputFileName | const System::String& | The input file name. |
outputFileName | const System::String& | The output file name. |
saveFormat | Aspose::Words::SaveFormat | The save format. |
pattern | const System::String& | A string to be replaced. |
replacement | const System::String& | A string to replace all occurrences of pattern. |
options | const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>& | FindReplaceOptions object to specify additional options. |
ReturnValue
The number of replacements made.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
See Also
- Enum SaveFormat
- Class FindReplaceOptions
- Class Replacer
- Namespace Aspose::Words::LowCode
- Library Aspose.Words for C++
Replacer::Replace(const System::String&, const System::String&, const System::SharedPtr<Aspose::Words::Saving::SaveOptions>&, const System::SharedPtr<System::Text::RegularExpressions::Regex>&, const System::String&, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&) method
Replaces all occurrences of a specified character string pattern with a replacement string in the input file using a regular expression, with the specified save format and additional options.
static int32_t Aspose::Words::LowCode::Replacer::Replace(const System::String &inputFileName, const System::String &outputFileName, const System::SharedPtr<Aspose::Words::Saving::SaveOptions> &saveOptions, const System::SharedPtr<System::Text::RegularExpressions::Regex> &pattern, const System::String &replacement, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions> &options=nullptr)
Parameter | Type | Description |
---|---|---|
inputFileName | const System::String& | The input file name. |
outputFileName | const System::String& | The output file name. |
saveOptions | const System::SharedPtr<Aspose::Words::Saving::SaveOptions>& | The save options. |
pattern | const System::SharedPtr<System::Text::RegularExpressions::Regex>& | A regular expression pattern used to find matches. |
replacement | const System::String& | A string to replace all occurrences of pattern. |
options | const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>& | FindReplaceOptions object to specify additional options. |
ReturnValue
The number of replacements made.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
See Also
- Class SaveOptions
- Class FindReplaceOptions
- Class Replacer
- Namespace Aspose::Words::LowCode
- Library Aspose.Words for C++
Replacer::Replace(const System::String&, const System::String&, const System::SharedPtr<Aspose::Words::Saving::SaveOptions>&, const System::String&, const System::String&, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>&) method
Replaces all occurrences of a specified character string pattern with a replacement string in the input file, with the specified save format and additional options.
static int32_t Aspose::Words::LowCode::Replacer::Replace(const System::String &inputFileName, const System::String &outputFileName, const System::SharedPtr<Aspose::Words::Saving::SaveOptions> &saveOptions, const System::String &pattern, const System::String &replacement, const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions> &options=nullptr)
Parameter | Type | Description |
---|---|---|
inputFileName | const System::String& | The input file name. |
outputFileName | const System::String& | The output file name. |
saveOptions | const System::SharedPtr<Aspose::Words::Saving::SaveOptions>& | The save options. |
pattern | const System::String& | A string to be replaced. |
replacement | const System::String& | A string to replace all occurrences of pattern. |
options | const System::SharedPtr<Aspose::Words::Replacing::FindReplaceOptions>& | FindReplaceOptions object to specify additional options. |
ReturnValue
The number of replacements made.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
See Also
- Class SaveOptions
- Class FindReplaceOptions
- Class Replacer
- Namespace Aspose::Words::LowCode
- Library Aspose.Words for C++
Replacer::Replace(const System::String&, const System::String&, const System::SharedPtr<System::Text::RegularExpressions::Regex>&, const System::String&) method
Replaces all occurrences of a specified character string pattern with a replacement string in the input file using a regular expression.
static int32_t Aspose::Words::LowCode::Replacer::Replace(const System::String &inputFileName, const System::String &outputFileName, const System::SharedPtr<System::Text::RegularExpressions::Regex> &pattern, const System::String &replacement)
Parameter | Type | Description |
---|---|---|
inputFileName | const System::String& | The input file name. |
outputFileName | const System::String& | The output file name. |
pattern | const System::SharedPtr<System::Text::RegularExpressions::Regex>& | A regular expression pattern used to find matches. |
replacement | const System::String& | A string to replace all occurrences of pattern. |
ReturnValue
The number of replacements made.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
See Also
- Class Replacer
- Namespace Aspose::Words::LowCode
- Library Aspose.Words for C++
Replacer::Replace(const System::String&, const System::String&, const System::String&, const System::String&) method
Replaces all occurrences of a specified character string pattern with a replacement string in the input file.
static int32_t Aspose::Words::LowCode::Replacer::Replace(const System::String &inputFileName, const System::String &outputFileName, const System::String &pattern, const System::String &replacement)
Parameter | Type | Description |
---|---|---|
inputFileName | const System::String& | The input file name. |
outputFileName | const System::String& | The output file name. |
pattern | const System::String& | A string to be replaced. |
replacement | const System::String& | A string to replace all occurrences of pattern. |
ReturnValue
The number of replacements made.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
See Also
- Class Replacer
- Namespace Aspose::Words::LowCode
- Library Aspose.Words for C++