Lớp GCKHLSSegment
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Lớp cung cấp các trình trợ giúp để chuyển đổi giữa GCKHLSSegmentFormat
và NSString
.
Kế thừa NSObject.
Phương thức trợ giúp để chuyển đổi từ GCKHLSSegmentFormat
thành NSString
.
- Trả bóng
- NSString Giá trị chuỗi tương ứng với
GCKHLSSegmentFormat
. nil
cho GCKHLSSegmentFormatUndefined
và các giá trị enum không hợp lệ.
- Năm thành lập
- 4.6.0
Phương thức trợ giúp để chuyển đổi từ NSString
thành GCKHLSSegmentFormat
.
Phép so sánh này không phân biệt chữ hoa chữ thường.
- Trả bóng
- GCKHLSSegmentFormat Giá trị enum
GCKHLSSegmentFormat
tương ứng. GCKHLSSegmentFormatUndefined
cho chuỗi không hợp lệ.
- Năm thành lập
- 4.6.0
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eGCKHLSSegment\u003c/code\u003e class provides helper methods for converting between \u003ccode\u003eGCKHLSSegmentFormat\u003c/code\u003e and \u003ccode\u003eNSString\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003emapHLSSegmentFormatToString:\u003c/code\u003e converts a \u003ccode\u003eGCKHLSSegmentFormat\u003c/code\u003e value to its corresponding \u003ccode\u003eNSString\u003c/code\u003e representation.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003emapHLSSegmentFormatStringToEnum:\u003c/code\u003e converts an \u003ccode\u003eNSString\u003c/code\u003e representation of a segment format to its corresponding \u003ccode\u003eGCKHLSSegmentFormat\u003c/code\u003e enum value.\u003c/p\u003e\n"],["\u003cp\u003eBoth helper methods were introduced in version 4.6.0 of the framework.\u003c/p\u003e\n"]]],["The `GCKHLSSegment` class provides two helper methods for converting between `GCKHLSSegmentFormat` and `NSString`. `mapHLSSegmentFormatToString:` converts a `GCKHLSSegmentFormat` value to its corresponding string representation, returning `nil` for undefined or invalid values. `mapHLSSegmentFormatStringToEnum:` converts a string to its corresponding `GCKHLSSegmentFormat` enum value, performing a case-insensitive comparison and returning `GCKHLSSegmentFormatUndefined` for invalid strings. These methods were introduced in version 4.6.0.\n"],null,["# GCKHLSSegment Class\n\n[Class Methods](#pub-static-methods) \nGCKHLSSegment Class Reference \n\nOverview\n--------\n\nClass that provides helpers to convert between `GCKHLSSegmentFormat` and `NSString`.\n\nInherits NSObject.\n\n|-------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|\n| Class Method Summary -------------------- ||\n| (nullable NSString \\*) | + [mapHLSSegmentFormatToString:](/cast/docs/reference/ios/interface_g_c_k_h_l_s_segment#a95e3c01240dbdb2335a29ae81d91da10) |\n| | Helper method to convert from `GCKHLSSegmentFormat` to `NSString`. [More...](#a95e3c01240dbdb2335a29ae81d91da10) |\n| ||\n| ([GCKHLSSegmentFormat](/cast/docs/reference/ios/g_c_k_h_l_s_segment_format_8h#a2e7a0fabbe01b583c51dab04d512642b)) | + [mapHLSSegmentFormatStringToEnum:](/cast/docs/reference/ios/interface_g_c_k_h_l_s_segment#ad04ae4b1459b9ace26d05767e3e2a618) |\n| | Helper method to convert from `NSString` to `GCKHLSSegmentFormat`. [More...](#ad04ae4b1459b9ace26d05767e3e2a618) |\n| ||\n\nMethod Detail\n-------------\n\n|-------------------------------------------------------|---|-------------------------------------------------------------------------------------------------------------------|--------------------|---|\n| + (nullable NSString \\*) mapHLSSegmentFormatToString: | | ([GCKHLSSegmentFormat](/cast/docs/reference/ios/g_c_k_h_l_s_segment_format_8h#a2e7a0fabbe01b583c51dab04d512642b)) | *hlsSegmentFormat* | |\n\nHelper method to convert from `GCKHLSSegmentFormat` to `NSString`.\n\nReturns\n: NSString The string value corresponding to `GCKHLSSegmentFormat`. `nil` for `GCKHLSSegmentFormatUndefined` and invalid enum values.\n\nSince\n: 4.6.0 \n\n|------------------------------------------------------------------------------------------------------------------------------------------------------|---|---------------|--------------------------|---|\n| + ([GCKHLSSegmentFormat](/cast/docs/reference/ios/g_c_k_h_l_s_segment_format_8h#a2e7a0fabbe01b583c51dab04d512642b)) mapHLSSegmentFormatStringToEnum: | | (NSString \\*) | *hlsSegmentFormatString* | |\n\nHelper method to convert from `NSString` to `GCKHLSSegmentFormat`.\n\nThe comparison is case insensitive.\n\nReturns\n: GCKHLSSegmentFormat The corresponding `GCKHLSSegmentFormat` enum value. `GCKHLSSegmentFormatUndefined` for invalid string.\n\nSince\n: 4.6.0"]]