LibreOfficeDev 25.2 सहयोग
(Mid प्रकार्य)स्ट्रिङ अभिव्यक्तिको निर्दिष्ट भाग फर्काउँछ,वा स्ट्रिङ अभिव्यक्तिको भाग अर्को स्ट्रिङ (Mid कथन)सँग प्रतिस्थापन गर्दछ ।
Mid (Text As String, Start As Long [, Length As Long])
Mid (Text As String, Start As Long, Length As Long, Text As String)
स्ट्रिङ (प्रकार्यद्वारा मात्र)
पाठ:कुनै स्ट्रिङ अभिव्यक्ति जसलाई तपाईँ परिमार्जन गर्न चाहनुहुन्छ ।
Start: Numeric expression that indicates the character position within the string where the string portion that you want to replace or to return begins. The minimum allowed value is 1. The maximum allowed value is 2,147,483,648.
Length: Numeric expression that returns the number of characters that you want to replace or return. The maximum allowed value is 2,147,483,648.
यदिMid प्रकार्य का लम्बाइ परामिति छाडिएको खण्डमा स्ट्रिङ अभिव्यक्तिमा भएका सबै क्यारेक्टरहरू स्ट्रिङको सुरु स्थिति मार्फत अन्तिमसम्म फर्किन्छन् ।
Mid विवरणमा लम्बाइ परामिति जसलाई तपाईँले प्रतिस्थापन गर्न चाहेको पाठको लम्बाइ भन्दा कम भएको खण्डमा पाठलाई निर्दिष्ट लम्बाइलाई सम्म बाढाउछ ।
पाठ: स्ट्रिङ अभिव्यक्तिले स्ट्रिङ अभिव्यक्तिलाई(Mid कथन)लाई प्रतिस्थापन गर्दछ ।
Sub ExampleMid_Function_and_Statement
text = "This is the original Text"
func1:
MsgBox Mid(text, 13, 8) ' returns the word "original"
MsgBox text ' text is not modified
stmt1:
Mid(text, 13, 8, "new")
MsgBox text ' returns "This is the new Text"
func2:
MsgBox Mid(start:=10, string:="The quick brown fox ..") ' shows " brown fox .."
stmt2:
Mid text, 9, 12, "a new Phrase"
MsgBox text ' returns "This is a new Phrase"
End Sub