summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_searchex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdf_searchex.cpp')
-rw-r--r--fpdfsdk/fpdf_searchex.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_searchex.cpp b/fpdfsdk/fpdf_searchex.cpp
index f82db37b5a..13729167ed 100644
--- a/fpdfsdk/fpdf_searchex.cpp
+++ b/fpdfsdk/fpdf_searchex.cpp
@@ -15,3 +15,11 @@ FPDFText_GetCharIndexFromTextIndex(FPDF_TEXTPAGE text_page, int nTextIndex) {
return static_cast<CPDF_TextPage*>(text_page)
->CharIndexFromTextIndex(nTextIndex);
}
+
+DLLEXPORT int STDCALL
+FPDFText_GetTextIndexFromCharIndex(FPDF_TEXTPAGE text_page, int nCharIndex) {
+ if (!text_page)
+ return -1;
+ return static_cast<CPDF_TextPage*>(text_page)->TextIndexFromCharIndex(
+ nCharIndex);
+}