alireza_hsi 160 ارسال شده در 20 فروردین، ۱۳۹۴ اشتراک گذاری ارسال شده در 20 فروردین، ۱۳۹۴ سلام امروز یک کتابخانه نیاز پیدا کردم که تونستم پیدا کنم چون خیلی مفید و مهم هست حتما دانلود کنید و داشته باشید واقعا دست سازنده درد نکنه کلیه توابع رشته ای در .net رو پیاده کرده. این هم لیست کار انجام کارهایی که میشه روی رشته انجام داد ... قبلش باید با این کد کتابخانه رو فعال کنید .. [Sub Globals Dim sf AsStringFunctions sf.Initialize End Sub StringFunctions Version 1.05 AsciiCodesDisplays a MessageBox with all Characters and their ASCII codes. AddSpaces (HowMany As Int) As StringReturns a string of spaces. The number returned is set by HowMany. At (YourString As String, SearchFor As String))Returns the position of the SearchFor within YourString. CurrentWeek (MyDate As String) As IntReturns the number of the current week, 1-52 from the date passed to MyDate. DayOfMonth (MyDate As ) As IntReturns the day of the month like 1-31, from the date passed to MyDate. Decrypt (YourText As String) As StringConverts an encrypted string of text to readable format, no key is needed. Empty (StringText As String) As BooleanTest to see if the string is empty and returns True if it is, otherwise returns False. Encrypt (YourText As String) As StringConverts a string of text to simple encryption, no Key is needed. EraseDataThis will erase all data saved with the SaveData function stored in thetemporary vault. FileExist (PathAndFileName As String) As BooleanReturns True if the filename passed does exist, otherwise returns False.Be sure to include the path like:If FileExist("/mnt/sdcard/mydata.dat") Then MsgBox("Yes", "The Answer") GetData (Key As Object) As ObjectGets data from the temporary vault.EditText1.Text = SF.GetData("EnteredName")The Key is case sensitive. InString (YourString As String, SearchFor As String))Returns the position of the SearchFor within YourString. IsEmpty (StringText As String) As BooleanTest to see if the string is empty and returns True if it is, otherwise returns False. Left (StringText As String, Length As Long) As StringReturns the Left portion of a string with the number of characters passedin Length. Len (StringText As String) As LongReturns the length of the string. ListToString (YourList As List, Sorted As Boolean, Ascending As Boolean) As StringConverts a List object to a String. ListToStringArray (YourList As List, Sorted As Boolean, Ascending As Boolean) As String()Converts a List object to a String Array. Lower (StringText As String) As StringReturns the string converted to Lowercase characters. Ltrim (StringText As String) As StringReturns a new string with the leading spaces removed. MB (Message As String)Same as MsgBox but only needs one parameter. Mid (StringText As String, Start As Int, Length As Int) As StringReturns the a new String for how ever many characters passed in Length froma starting position passed in Start.Example:Mid("This is a long line of text", 5, 2)In this example the function will Return: "is" MidExtract (StringText As String, Start As String, EndAt As String) As StringUsed to extract text from a string between to other blocks of text.Ans = MidExtract("Dr. Jim Joe Brown", "Jim", "Brown") 'Returns: JoeAns = MidExtract("Dr. Jim [Joe] Brown", "[", "]") 'Returns: Joe MidS (StringText As String, StartAt As Int) As StringWorks like the Mid$ function in Visual Basic. Month (MyDate As String) As IntReturns the number of the current month 1-12 as Int type, from the date passed to MyDate. MonthName (MyDate As String) As StringReturns the Name the current month as a String like January, etc., from the date passed to MyDate. NewDate (DatePassed As String, HowManyDays As Int) As StringReturns a new date adding or subtracting HowManyDays. HowManyDays can be positive ornegative numbers. NumOfDaysBetween (CurrentDate As String, OtherDate As String) As IntReturns the numbers of days passed between the two dates passed. Pad (Text As String, PadWith As String, Length As Int, Post As Boolean) As StringUsed to pad a string with a selected character. If Post = True the padding will followany text in the string, if Post = False, the padding will be before the text. Length isthe total length for the padded string. PadWith is the selected character to use for thepadding.SF.Pad("Jimmy Joe", "*", 20, True) 'Returns "Jimmy Joe***********" Proper (StringText As String) As StringReturns the string in proper format.Example:MyText = "jim joe brown"MyText = SF.Proper(Mytext)This function will return: "Jim Joe Brown" Replicate (mChar As String, Times As Int) As StringRepeats any character passed, a selected number of Times. Right (StringText As String, Length As Long) As StringReturns the Right portion of a string with the number of characters passedin Length. RndChrGen (StringLength As Int, CharacterType As Int) As StringReturns a string of ramdom characters with a length specified by StringLength. CharacterType tellsthe function what type of characters to return.CharacterType = 0 for Upper and Lower caseCharacterType = 1 for Upper case onlyCharacterType = 2 for Lower case only Rtrim (StringText As String) As StringReturns a new string with the trailing spaces removed. SaveData (Key As Object, Data As Object)Save data passed in a temporary file.SF.SaveData("ScreenTitle", MyVar)orSF.SaveData("EnteredName", EditText1.Text) ScrInfo ( As Pect) As IntReturns information about the devices screen. You can pass these parameters:Pass "W" for WidthPass "H" for HeightPass "S" for ScalePass "D" for DPICall like: SF.ScrInfo("W") SearchDate (Date1 As String, Date2 As String, DateRange As Int) As BooleanReturns True if the Date1 and the Date2 are within x Days(DateRange) of each other.Pass the dates as Strings.Example:SearchDate("03/01/2013", "02/15/2013", 30) Split (CurrentString As String, Split_At_Delimiter As String) As ListReturns a LIST of items from the string split at the Delimiter.EXAMPLE:Dim ANS As ListANS = SF.Split("This is a test string.", " ") SplitGetWord (CurrentString As String, Split_At_Delimiter As String, GetElement As Int) As StringReturns just the one element selected with GetElement from the string.EXAMPLE:ANS = SF.SplitGetWord("This is a test string.", " ", 2)In this example the function will Return: "is" StrArraySort (StringArray() As String, Ascending As Boolean) As String()Used to sort a String Array. Sort will be in Ascending order if Ascending = True. StringArrayToList (StringArray() As String, Sorted As Boolean, Ascending As Boolean) As ListConverts a String Array to a List object. StringToList (StringText As String, Sorted As Boolean, Ascending As Boolean) As ListConvert a String to a List object. This will split the string between words. Stuff (CurrentText As String, InsertInString As String, RemoveFromString As String) As StringUsed to replace text in a string with new text.Example:MyText = "I will tell you that joe is a good friend!"MyText = SF.Stuff(MyText, "Joe Brown", "joe")This function will return: "I will tell you that Joe Brown is a good friend!" Today () As StringReturns the devices date. Trim (Text As String) As StringReturns a new string with leading and trailing spaces removed. Upper (StringText As String) As StringReturns the string converted to Uppercase characters. Val (StringText As String) As DoubleReturns the numerical value of a string. If the string contains now value it returns 0. ValidDate (ChkDate As ) As BooleanReturns True if the date passed is a Valid date. WeekDay (MyDate As String) As StringReturns the number of the day of the week 1-7 as a String, from the date passed to MyDate. WeekName (MyDate As String) As StringReturns the name of the day of the week like Sunday, Monday, etc., from the date passed to MyDate. Year (MyDate As String) As StringReturns the year of the date passed in MyDate.Example:SF.Year("01/01/2013") returns "2013" getSDCardPath () As StringReturns external/physical SD Card directory. This function may not return the correct storeon an Android OS above 4.1. This is due to changes made to the OS system in the newer versions.Returns "", if the store can not be read. iif (Value1 As String, Value2 As String, Value3 As String) As StringThis is a single line if conditional test. If Value1 is true, Value2 is returned, otherwiseValue3 will be returned. Works with strings and booleans.Example:MsgBox(iif("Bob"="Jim", "They are the same", "They are not the same"), "The Answer")orMyBoolean = iif(FirstTime = True, StartMyService = True, StartMyService = False) StringFunctions 1.05.zip لینک ارسال به اشتراک گذاری در سایت های دیگر تنظیمات بیشتر اشتراک گذاری ...
puyan.best 18 ارسال شده در 24 مهر، ۱۳۹۴ اشتراک گذاری ارسال شده در 24 مهر، ۱۳۹۴ سلام واقعا ممنون خیلی وقت بود دنبالش بودم...... فقط یه سوال..... چرا تابع left و right کار نمیکنن ؟ من خیلی کارم مهمه با این دوتا.... لطفا کمک کنین. خیلی فوریه لینک ارسال به اشتراک گذاری در سایت های دیگر تنظیمات بیشتر اشتراک گذاری ...
mohammad-alone 564 ارسال شده در 24 مهر، ۱۳۹۴ اشتراک گذاری ارسال شده در 24 مهر، ۱۳۹۴ برای اینکاه میتونید از IndexOf خود متغیر استارینگ معمولی استفاده کنید لینک ارسال به اشتراک گذاری در سایت های دیگر تنظیمات بیشتر اشتراک گذاری ...
puyan.best 18 ارسال شده در 24 مهر، ۱۳۹۴ اشتراک گذاری ارسال شده در 24 مهر، ۱۳۹۴ برای اینکاه میتونید از IndexOf خود متغیر استارینگ معمولی استفاده کنید مرسی لطف کردی. ولی فقط این نیس. چیزای دیگه مثل لایک ام لازم داشتم. من فقط یه خط کد میخام که سه حرف آخر رشته رو با یه رشته دیگه که مثل همونهنشون بده مثلا وقتی چنتا رشته مختلف "1234" و "12345" و "12345678" دارم و تو edittext تایپ میکنم "12345678" از بین این 3 تا اونی که سه حرف آخرش 678 هست رو چاپ کنه میشه همچین چیزی ؟ تو C# و ++c با تابع like% میشد لینک ارسال به اشتراک گذاری در سایت های دیگر تنظیمات بیشتر اشتراک گذاری ...
mohammad-alone 564 ارسال شده در 24 مهر، ۱۳۹۴ اشتراک گذاری ارسال شده در 24 مهر، ۱۳۹۴ آره خوب شما میتونی اول طول رشته رو بگیری بعد بهش بگی که سه تای آخر رو برام جدا کن همین لینک ارسال به اشتراک گذاری در سایت های دیگر تنظیمات بیشتر اشتراک گذاری ...
alia 51 ارسال شده در 24 مهر، ۱۳۹۴ اشتراک گذاری ارسال شده در 24 مهر، ۱۳۹۴ به چه دردی میخوره؟ لینک ارسال به اشتراک گذاری در سایت های دیگر تنظیمات بیشتر اشتراک گذاری ...
puyan.best 18 ارسال شده در 24 مهر، ۱۳۹۴ اشتراک گذاری ارسال شده در 24 مهر، ۱۳۹۴ به چه دردی میخوره؟ چی به چه دردی میخوره ؟! لینک ارسال به اشتراک گذاری در سایت های دیگر تنظیمات بیشتر اشتراک گذاری ...
alia 51 ارسال شده در 24 مهر، ۱۳۹۴ اشتراک گذاری ارسال شده در 24 مهر، ۱۳۹۴ کتابخونه دیگه لینک ارسال به اشتراک گذاری در سایت های دیگر تنظیمات بیشتر اشتراک گذاری ...
puyan.best 18 ارسال شده در 24 مهر، ۱۳۹۴ اشتراک گذاری ارسال شده در 24 مهر، ۱۳۹۴ کتابخونه دیگه واسه کسایی که اکثر کاراشون با توابع رشته ای هست به کار میاد. یا حتی کسایی که بعضی مواقع با رشته سر و کار دارن لینک ارسال به اشتراک گذاری در سایت های دیگر تنظیمات بیشتر اشتراک گذاری ...
مجید آرتا 5,874 ارسال شده در 24 مهر، ۱۳۹۴ اشتراک گذاری ارسال شده در 24 مهر، ۱۳۹۴ @@puyan.best, شما برای Left و Right هم میتونید خودتون از SubString استفاده کنید به این شکل که برای Right میتونید مثلا بگید 3 حرف اخر و بیایید Length متن رو از عدد 3 کم کنید و به تابع SubString بدیم. در کل کتابخونه واسه Left و Right و Mid هم هست و میتونید همین کلمات رو جستجو کنید. لینک ارسال به اشتراک گذاری در سایت های دیگر تنظیمات بیشتر اشتراک گذاری ...
puyan.best 18 ارسال شده در 24 مهر، ۱۳۹۴ اشتراک گذاری ارسال شده در 24 مهر، ۱۳۹۴ @@puyan.best, شما برای Left و Right هم میتونید خودتون از SubString استفاده کنید به این شکل که برای Right میتونید مثلا بگید 3 حرف اخر و بیایید Length متن رو از عدد 3 کم کنید و به تابع SubString بدیم. در کل کتابخونه واسه Left و Right و Mid هم هست و میتونید همین کلمات رو جستجو کنید. آره همین راه خیلی عالیه. ممنون. لطف میکنید یه مثال بیارید ؟ لینک ارسال به اشتراک گذاری در سایت های دیگر تنظیمات بیشتر اشتراک گذاری ...
puyan.best 18 ارسال شده در 24 مهر، ۱۳۹۴ اشتراک گذاری ارسال شده در 24 مهر، ۱۳۹۴ @@puyan.best, شما برای Left و Right هم میتونید خودتون از SubString استفاده کنید به این شکل که برای Right میتونید مثلا بگید 3 حرف اخر و بیایید Length متن رو از عدد 3 کم کنید و به تابع SubString بدیم. در کل کتابخونه واسه Left و Right و Mid هم هست و میتونید همین کلمات رو جستجو کنید. این کارو کردم ولی به جای سه حرف آخر .... اول حرفارو میشماره و نشون میده... مثلا 582 رو 3 و یا 99965 رو 5 نشون میده لینک ارسال به اشتراک گذاری در سایت های دیگر تنظیمات بیشتر اشتراک گذاری ...
puyan.best 18 ارسال شده در 25 مهر، ۱۳۹۴ اشتراک گذاری ارسال شده در 25 مهر، ۱۳۹۴ این کارو کردم ولی به جای سه حرف آخر .... اول حرفارو میشماره و نشون میده... مثلا 582 رو 3 و یا 99965 رو 5 نشون میده از همگی ممنون مشکل حل شد. لینک ارسال به اشتراک گذاری در سایت های دیگر تنظیمات بیشتر اشتراک گذاری ...
saeed692 37 ارسال شده در 27 آذر، ۱۳۹۴ اشتراک گذاری ارسال شده در 27 آذر، ۱۳۹۴ سلام امروز یک کتابخانه نیاز پیدا کردم که تونستم پیدا کنم چون خیلی مفید و مهم هست حتما دانلود کنید و داشته باشید واقعا دست سازنده درد نکنه کلیه توابع رشته ای در .net رو پیاده کرده. این هم لیست کار انجام کارهایی که میشه روی رشته انجام داد ... قبلش باید با این کد کتابخانه رو فعال کنید .. [Sub Globals Dim sf AsStringFunctions sf.Initialize End Sub StringFunctions Version 1.05 AsciiCodesDisplays a MessageBox with all Characters and their ASCII codes. AddSpaces (HowMany As Int) As StringReturns a string of spaces. The number returned is set by HowMany. At (YourString As String, SearchFor As String))Returns the position of the SearchFor within YourString. CurrentWeek (MyDate As String) As IntReturns the number of the current week, 1-52 from the date passed to MyDate. DayOfMonth (MyDate As ) As IntReturns the day of the month like 1-31, from the date passed to MyDate. Decrypt (YourText As String) As StringConverts an encrypted string of text to readable format, no key is needed. Empty (StringText As String) As BooleanTest to see if the string is empty and returns True if it is, otherwise returns False. Encrypt (YourText As String) As StringConverts a string of text to simple encryption, no Key is needed. EraseDataThis will erase all data saved with the SaveData function stored in the temporary vault. FileExist (PathAndFileName As String) As BooleanReturns True if the filename passed does exist, otherwise returns False. Be sure to include the path like: If FileExist("/mnt/sdcard/mydata.dat") Then MsgBox("Yes", "The Answer") GetData (Key As Object) As ObjectGets data from the temporary vault. EditText1.Text = SF.GetData("EnteredName") The Key is case sensitive. InString (YourString As String, SearchFor As String))Returns the position of the SearchFor within YourString. IsEmpty (StringText As String) As BooleanTest to see if the string is empty and returns True if it is, otherwise returns False. Left (StringText As String, Length As Long) As StringReturns the Left portion of a string with the number of characters passed in Length. Len (StringText As String) As LongReturns the length of the string. ListToString (YourList As List, Sorted As Boolean, Ascending As Boolean) As StringConverts a List object to a String. ListToStringArray (YourList As List, Sorted As Boolean, Ascending As Boolean) As String()Converts a List object to a String Array. Lower (StringText As String) As StringReturns the string converted to Lowercase characters. Ltrim (StringText As String) As StringReturns a new string with the leading spaces removed. MB (Message As String)Same as MsgBox but only needs one parameter. Mid (StringText As String, Start As Int, Length As Int) As StringReturns the a new String for how ever many characters passed in Length from a starting position passed in Start. Example: Mid("This is a long line of text", 5, 2) In this example the function will Return: "is" MidExtract (StringText As String, Start As String, EndAt As String) As StringUsed to extract text from a string between to other blocks of text. Ans = MidExtract("Dr. Jim Joe Brown", "Jim", "Brown") 'Returns: Joe Ans = MidExtract("Dr. Jim [Joe] Brown", "[", "]") 'Returns: Joe MidS (StringText As String, StartAt As Int) As StringWorks like the Mid$ function in Visual Basic. Month (MyDate As String) As IntReturns the number of the current month 1-12 as Int type, from the date passed to MyDate. MonthName (MyDate As String) As StringReturns the Name the current month as a String like January, etc., from the date passed to MyDate. NewDate (DatePassed As String, HowManyDays As Int) As StringReturns a new date adding or subtracting HowManyDays. HowManyDays can be positive or negative numbers. NumOfDaysBetween (CurrentDate As String, OtherDate As String) As IntReturns the numbers of days passed between the two dates passed. Pad (Text As String, PadWith As String, Length As Int, Post As Boolean) As StringUsed to pad a string with a selected character. If Post = True the padding will follow any text in the string, if Post = False, the padding will be before the text. Length is the total length for the padded string. PadWith is the selected character to use for the padding. SF.Pad("Jimmy Joe", "*", 20, True) 'Returns "Jimmy Joe***********" Proper (StringText As String) As StringReturns the string in proper format. Example: MyText = "jim joe brown" MyText = SF.Proper(Mytext) This function will return: "Jim Joe Brown" Replicate (mChar As String, Times As Int) As StringRepeats any character passed, a selected number of Times. Right (StringText As String, Length As Long) As StringReturns the Right portion of a string with the number of characters passed in Length. RndChrGen (StringLength As Int, CharacterType As Int) As StringReturns a string of ramdom characters with a length specified by StringLength. CharacterType tells the function what type of characters to return. CharacterType = 0 for Upper and Lower case CharacterType = 1 for Upper case only CharacterType = 2 for Lower case only Rtrim (StringText As String) As StringReturns a new string with the trailing spaces removed. SaveData (Key As Object, Data As Object)Save data passed in a temporary file. SF.SaveData("ScreenTitle", MyVar) or SF.SaveData("EnteredName", EditText1.Text) ScrInfo ( As Pect) As IntReturns information about the devices screen. You can pass these parameters: Pass "W" for Width Pass "H" for Height Pass "S" for Scale Pass "D" for DPI Call like: SF.ScrInfo("W") SearchDate (Date1 As String, Date2 As String, DateRange As Int) As BooleanReturns True if the Date1 and the Date2 are within x Days(DateRange) of each other. Pass the dates as Strings. Example: SearchDate("03/01/2013", "02/15/2013", 30) Split (CurrentString As String, Split_At_Delimiter As String) As ListReturns a LIST of items from the string split at the Delimiter. EXAMPLE: Dim ANS As List ANS = SF.Split("This is a test string.", " ") SplitGetWord (CurrentString As String, Split_At_Delimiter As String, GetElement As Int) As StringReturns just the one element selected with GetElement from the string. EXAMPLE: ANS = SF.SplitGetWord("This is a test string.", " ", 2) In this example the function will Return: "is" StrArraySort (StringArray() As String, Ascending As Boolean) As String()Used to sort a String Array. Sort will be in Ascending order if Ascending = True. StringArrayToList (StringArray() As String, Sorted As Boolean, Ascending As Boolean) As ListConverts a String Array to a List object. StringToList (StringText As String, Sorted As Boolean, Ascending As Boolean) As ListConvert a String to a List object. This will split the string between words. Stuff (CurrentText As String, InsertInString As String, RemoveFromString As String) As StringUsed to replace text in a string with new text. Example: MyText = "I will tell you that joe is a good friend!" MyText = SF.Stuff(MyText, "Joe Brown", "joe") This function will return: "I will tell you that Joe Brown is a good friend!" Today () As StringReturns the devices date. Trim (Text As String) As StringReturns a new string with leading and trailing spaces removed. Upper (StringText As String) As StringReturns the string converted to Uppercase characters. Val (StringText As String) As DoubleReturns the numerical value of a string. If the string contains now value it returns 0. ValidDate (ChkDate As ) As BooleanReturns True if the date passed is a Valid date. WeekDay (MyDate As String) As StringReturns the number of the day of the week 1-7 as a String, from the date passed to MyDate. WeekName (MyDate As String) As StringReturns the name of the day of the week like Sunday, Monday, etc., from the date passed to MyDate. Year (MyDate As String) As StringReturns the year of the date passed in MyDate. Example: SF.Year("01/01/2013") returns "2013" getSDCardPath () As StringReturns external/physical SD Card directory. This function may not return the correct store on an Android OS above 4.1. This is due to changes made to the OS system in the newer versions. Returns "", if the store can not be read. iif (Value1 As String, Value2 As String, Value3 As String) As StringThis is a single line if conditional test. If Value1 is true, Value2 is returned, otherwise Value3 will be returned. Works with strings and booleans. Example: MsgBox(iif("Bob"="Jim", "They are the same", "They are not the same"), "The Answer") or MyBoolean = iif(FirstTime = True, StartMyService = True, StartMyService = False) StringFunctions 1.05.zip باهاش میشه چیکار کرد میشه توضیح بدید لینک ارسال به اشتراک گذاری در سایت های دیگر تنظیمات بیشتر اشتراک گذاری ...
مجید آرتا 5,874 ارسال شده در 27 آذر، ۱۳۹۴ اشتراک گذاری ارسال شده در 27 آذر، ۱۳۹۴ باهاش میشه چیکار کرد میشه توضیح بدید دوستم هیچوقت پست اول رو نقل قول نکنید لطفا! این کتابخونه طبق توضیحات دوستمون و توابعی که مشاهده میشه می تونید تمامی عملیاتی که برای رشته ها موجوده انجتم بدید مثلا : اعتبار سنجی رمزگذاری رمز گشایی جستجو جداسازی فضای خالی و .... موفق باشید. لینک ارسال به اشتراک گذاری در سایت های دیگر تنظیمات بیشتر اشتراک گذاری ...
alirezaghdc 4 ارسال شده در 25 دی، ۱۳۹۵ اشتراک گذاری ارسال شده در 25 دی، ۱۳۹۵ سلام یه سوال داشتم میخوام کاربر یه متنی رو وارد ادیت تکست بکنه بعد بشه رو حروف اون کار کرد مثلا کاربر بنویسه Salam بعد برنامه بتونه بگه سومین حرف وارد شده چیه لینک ارسال به اشتراک گذاری در سایت های دیگر تنظیمات بیشتر اشتراک گذاری ...
ارسالهای توصیه شده
بایگانی شده
این موضوع بایگانی و قفل شده و دیگر امکان ارسال پاسخ نیست.